HTML CSS examples for CSS Layout:Position
Position elements using CSS along the bottom in container
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> header {<!--from ww w . j ava 2 s . c o m--> width:auto; height:51px; background-color:Chartreuse; } header>h1 { font-size:17px; font-weight:bold; float:left; color:yellow; padding:11px; } .maina>li { display:inline; list-style:none; } header>nav { width:301px; height:auto; border:medium blue; float:left; margin:11px; } .clear:after { content:""; display:table; clear:both; } </style> </head> <body> <header class="clear"> <h1>Lorem i</h1> <nav> <ul class="maina"> <li> <a href="Home">Lore</a> </li> <li> <a href="Projects">Lorem ip</a> </li> <li> <a href="Settings">Lorem ip</a> </li> </ul> </nav> </header> </body> </html>