fixed width floated menu
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css">
ul#nav2 { list-style: none; border-top: 2px solid silver; border-bottom: 2px solid silver; background:#ffffcc; white-space:nowrap; height:1.7em; width:750px; text-align:center; margin-left:auto; margin-right:auto; } #nav2 li { float:left; background:#ffffcc; width:20%; white-space:nowrap; } #nav2 a { border-left:2px solid silver; line-height:1.7em; height:1.7em; background:#f2f2f2; position:relative; text-decoration:none; display:block; } #nav2 a:hover { background:blue; color:white; } ul#nav2 li.selected a{ background:blue; color:white; } ul#nav2 li.last a{ border-right:2px solid silver; } * html ul#nav2 li.last{ width:auto; } </style>
</head>
<body>
<h2>Example below of fixed width floated menu</h2> <ul id='nav2'> <li class="selected"><a href="" title="">Home</a></li> <li><a href="">About Us</a></li> <li><a href="">Contact</a></li> <li><a href="">More</a></li> <li class="last"><a href="">Stuff</a></li> </ul>
</body> </html>
|
|
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
-
-
|