HTML CSS examples for CSS Layout:Position
Divs inside divs right bottom positioning
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #main-div {<!-- www . jav a 2 s. c om--> background-color:Chartreuse; padding:21px 21px 21px 21px; } #sub-div { background-color:yellow; height:auto; padding:6px 6px 6px 6px; } .content-div { font-size:19px; } .button-green { display:inline-block; padding-left:26px !important; padding-right:26px !important; padding-top:16px !important; padding-bottom:16px !important; font-size:15px; font-weight:normal; text-align:center; vertical-align:middle; cursor:pointer; background-image:none; border:2px solid blue; white-space:nowrap; padding:7px 13px; line-height:2.428571430; border-radius:5px; font-family:'PT Sans',helvetica; margin-top:11px; background:pink; color:OrangeRed; float:right; } .clear { clear:both; } </style> </head> <body> <div id="main-div"> <!-- Blue --> <div id="sub-div"> <!-- Red --> <div class="content-div" style="clear:both"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. V</p> <a href="#" class="button-green">Lorem </a> <div class="clear"></div> </div> </div> </div> </body> </html>