I'm having trouble creating a horizontal navigation menu with button-style links where I can't seem to get them all to be the same width. Using "width: px" doesn't work for links. Any suggestions?
Thanks
HTML:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type = "text/javascript" src="jquery.js"></script>
<title></title>
</head>
<body>
<div class="main">
<div class="header">
<img src="images/logo.jpg" />
</div>
<div class="navigation"><ul id = "linkbar">
<li><a href="">Home</a></li>
<li><a href="">Links</a></li>
<li><a href="">Guestbook</a></li>
<li><a href="">Contact</a></li></ul>
</div>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam,
feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae
est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum</a>
</div>
</body>
</html>
CSS:
body {
background-color: lightgray;
margin:0px;
padding:0px;
}
.header {
background-color:white;
}
.header img {
vertical-align: top;
}
.main {
background-color: limegreen;
text-align: center;
width: 900px;
margin: auto;
}
a:link {color:white; text-decoration:none;} /* unvisited link */
a:visited {color:white; text-decoration:none;} /* visited link */
a:hover {color:red; text-decoration:underline;} /* mouse over link*/
a:active {color:red; text-decoration:underline;} /* selected link */
.navigation {
text-align: center;
background-color: #f8901f;
/*background-image:url('images/navbar.jpg');*/
}
#linkbar a {
padding: 14px 0px 13px 0px;
text-decoration: none;
text-align: center;
text-transform: uppercase;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #000000;
border: none;
}
#linkbar {
margin-top: 0;
}
#linkbar li {
padding: 11px 0px 10px 0px;
list-style-type: none;
display: inline;
line-height: 2.5em;
}
#linkbar a:hover, #linkbar .current_page_item a {
background: url(images/img05.gif) repeat-x left top;
text-decoration: none;
color: #FFFFFF;
}