HTML CSS examples for CSS Layout:Position
Move DIV to the left of the centre position
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #red {<!-- ww w . j a v a 2 s .c om--> width:2px; margin:100px auto; background:red; } #blue { width:201px; background:blue; left:-51px; position:relative; } </style> </head> <body> <div id="red"> <div id="blue"> Lorem ipsum </div> </div> </body> </html>