HTML CSS examples for CSS Layout:Absolute Position
Position absolute inside a container
<html> <head> <title>Lorem ipsum dolor sit amet, consectet</title> <style type="text/css"> .foo {<!-- w w w. j a va2s. co m--> position:relative; width:100px; height:100px; background:Chartreuse; } .bar { position:absolute; width:31px; height:31px; top:6px; left:6px; background:yellow; } </style> </head> <body> <div class="foo"> <div class="bar"> Lorem </div> </div> </body> </html>