HTML CSS examples for CSS Layout:Position
Position Caption Div to bottom
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .wrapper {<!--from w ww. jav a 2 s . c o m--> height:301px; width:301px; background-color:Chartreuse; position:relative; } .main { height:100%; width:100%; } .caption { height:11%; width:100%; background:yellow ; opacity:0.8; margin-bottom:6px; color:blue; position:absolute; bottom:0; } </style> </head> <body> <div class="wrapper"> <div class="caption"> Lorem </div> <div class="main"></div> </div> </body> </html>