<!DOCTYPE html> <html> <head> <style> div { position: absolute; top: 0; left: 0; width: 100px; height: 100px; } div.offset { left: 100px; } div.offset2 { left: 200px; } </style> </head> <body> <div style="background: green"></div> <div class="offset" style="background: green"></div> <div class="offset2" style="background: green"></div> </body> </html>