Posts

Showing posts from October, 2013

Centering a page using DIV block

#container { width: 900px ; margin-left: auto ; margin-right: auto ; } This works with IE 6, 7, Firefox, Opera and Safari To overcome this pre-IE6 do this body { text-align: center; } #container { text-align: left; width: 900px; margin: 0 auto }

Super simple horizontal navigation bar

Image
It's easy and simple http://www.cssnewbie.com/super-simple-horizontal-navigation-bar/ <!-- Here's all it takes to make this navigation bar. --> <ul id="nav"> <li><a href="#">About Us</a></li> <li><a href="#">Our Products</a></li> <li><a href="#">FAQs</a></li> <li><a href="#">Contact</a></li> <li><a href="#">Login</a></li> </ul> <!-- That's it! --> /* Begin Navigation Bar Styling */ #nav { width: 100%; float: left; margin: 0 0 3em 0; padding: 0; list-style: none; background-color: #f2f2f2; border-bottom: 1px solid #ccc; border-top: 1px solid #ccc; } #nav li { float: left; } #nav li a { display: block; padding: 8px 15px; text-decoration: none; ...