HTML CSS examples for CSS Layout:Position
Position divs at top and bottom of containing div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html, body, #container, .content, .left, .right, .center { height:100%; } #container {<!-- www .j a va 2 s. co m--> min-height:350px; } #container { margin:0 auto; width:961px; } #container .content { margin-top:116px; position:relative; } #container .content .left, #container .content .center, #container .content .right { position:relative; width:308px; } #container .content .left { float:left; } #container .content .center { float:left; padding-left:20px; } #container .content .right { float:right; } #container .content .top, #container .content .bottom { position:absolute; } #container .content .top { top:0; } #container .content .bottom { bottom:0; } </style> </head> <body> <div id="container"> <div class="content"> <div class="left"> <a href="#"> <img src="https://www.java2s.com/style/demo/Firefox.png" alt="tyler st salon home"> </a> </div> <!-- end left --> <div class="center"> <a href="#" class="top"> <img src="https://www.java2s.com/style/demo/Firefox.png" alt="about tyler st salon"> </a> <a href="#" class="bottom"> <img src="https://www.java2s.com/style/demo/InternetExplorer.png" alt="tyler st salon service"> </a> </div> <!-- end center --> <div class="right"> <a href="#" class="top"> <img src="https://www.java2s.com/style/demo/Firefox.png" alt="tyler st salon products"> </a> <a href="#" class="bottom"> <img src="https://www.java2s.com/style/demo/Safari.png" alt="contact tyler st salon"> </a> </div> <!-- end right --> </div> <!-- end content --> </div> <!-- end container --> </body> </html>