HTML CSS examples for CSS Layout:2 Column
position two boxes to align one to top left corner
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .outer {<!-- w w w .j a va 2 s .com--> position:relative; width:401px; height:401px; background-color:Chartreuse; } h1 { color:yellow; } .inner { padding:9px; position:absolute; top:0; left:0; background-color:blue; } </style> </head> <body> <div class="outer"> <div class="inner"> <h1>Lorem ipsum</h1> </div> </div> </body> </html>