HTML CSS examples for CSS Layout:Position
Positioning DIVS
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <!--from ww w . j a v a 2 s.c o m--> <body> <div style="position:relative; border:2px solid #000; width:300px; height:100px"></div> <div style="position:relative; padding-top: 10px;"></div> <div style="position:relative; border:2px solid #000; width:300px; height:300px;"></div> <div style="position:relative; padding-top: 10px;"></div> <div style="position:relative; border:2px solid #000; width:300px; height:100px"></div> </body> </html>