HTML CSS examples for CSS Layout:Position
Variable Div size. Position top right
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .block {<!-- w w w . ja v a 2s. c o m--> display:block; padding:2em; } .wrapper { width:100%; } #map { width:51%; float:left; display:block; background:green; height:501px; } #contents { width:51%; float:right; display:block; } .contentDiv { padding:2em; position:relative; display:inline; } .positionedthing { display:block; padding:.6em; margin:.6em; background:yellow; float:right; } </style> </head> <body> <div class="wrapper"> <div id="map"> Lorem </div> <div id="contents"> <div class="block"> <div class="contentDiv"> <div class="positionedthing"> Lorem ipsum dolor sit ame </div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at </div> </div> <div class="block"> <div class="contentDiv"> <div class="positionedthing"> Lorem ipsum dolor sit ame </div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus s </div> </div> </div> </div> </body> </html>