HTML CSS examples for CSS Layout:Position
position an element aside to other using id/class
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #class1 {<!-- ww w .ja v a 2 s . co m--> width:201px; height:201px; background:Chartreuse; } #class2 { position:absolute; top:11px; left:221px; width:201px; height:201px; background:red; } </style> </head> <body> <div id="class1"> Lorem </div> <div id="class2"> Lorem </div> </body> </html>