HTML CSS examples for CSS Layout:Position
Positioning div to the right with an undefined width
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body {<!-- w w w . ja v a 2 s . c om--> padding-left:41px; padding-right:41px; } .wrapper { width:100%; max-width:1351px; margin:0 auto; } .contentwrapper { width:calc(100% - 191px); max-width:1161px; float:right; margin-top:51px; margin-left:41px; } #freelancewrapper { width:100%; max-width:1001px; height:441px; background-color:Chartreuse; position:absolute; right:0; } </style> </head> <body> <div class="wrapper"> <div class="contentwrapper"> <section id="freelancewrapper"></section> </div> </div> </body> </html>