Revision: 44523
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 13, 2011 11:36 by Sullan
Initial Code
<html> <head> <style type="text/css"> ul { list-style-type:none; margin:0 auto; padding:10px; padding-top:6px; padding-bottom:6px; background:#565656; text-align:center; } li { display:inline; } a:link,a:visited { font-weight:bold; color:#FFFFFF; background-color:#98bf21; text-align:center; padding:6px; text-decoration:none; text-transform:uppercase; } a:hover,a:active { background-color:#7A991A; } </style> </head> <body> <ul> <li><a href="#home">Home</a></li> <li><a href="#news">News</a></li> <li><a href="#contact">Contact</a></li> <li><a href="#about">About</a></li> </ul> <p><b>Note:</b> If you only set the padding for a elements (and not ul), the links will go outside the ul element. Therefore, we have added a top and bottom padding for the ul element.</p> </body> </html>
Initial URL
Initial Description
Initial Title
Center aligned block lists
Initial Tags
Initial Language
CSS