HTML CSS examples for CSS Layout:Relative Position
Relative Positioning Multiple Divs Same Class
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .question {<!-- w w w. java 2s . c om--> text-align:center; position:relative; top:201px; background:red; } .container { background:blue; } </style> </head> <body> <div class="container"> <div class="question"> Lore </div> <div class="question"> Lore </div> <div class="question" style="top: 0px"> Lore </div> </div> </body> </html>