Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <style> div.parent { position: relative; height: 300px; width: 80%; border: 3px solid #8ebf42; } div.absolute { position: absolute; width: 50%; bottom: 10px; border: 3px solid #8ebf42; } </style> </head> <body> <h2>Bottom property example</h2> <div class="parent"> The position of this div is set to relative. <div class="absolute">This div's bottom edge is placed 10 pixels above the bottom edge of the containing element, and the position is set to absolute.</div> </div> </body> </html>