HTML CSS examples for CSS Layout:Position
Position of divs with css
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <!-- w w w .j a v a 2 s. co m--> <body> <div style="width: 100%; height:300px; position: relative;"> <div id="header" style="float:right; height:300px; width: 60%; background-color: red;"> Lorem </div> </div> <div style="width: 100%;height:300px; position: relative;"> <div id="main" style="float:left; height:300px; width: 40%; background-color: green;"> Lorem </div> </div> <div style="clear: both"></div> </body> </html>