|
Ok, this appears just fine in IE6/7 but not Firefox. I have a horizontal navigation bar and there is extra space in-between the links in FF. Since I have a background color to appear when hovering over the links, the padding in-between the links will change colors, but not the entire link.
I hope I could explain it well enough, here is my code:
HTML
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</head>
<body>
<div class="headerwrap">
</div>
<div class="nav">
<ul>
<a href="one.html"><li>Link1</li></a>
<a href="two.html"><li>Link2</li></a>
<a href="three.html"><li>Link3</li></a>
</ul>
</div>
<div class="main">
Main
</div>
<div class="footer">
Footer
</div>
</body>
</html>
CSS (just put in the navigation bar CSS)
.nav {
width:750px;
margin:0px auto;
padding:0px;
text-align:center;
}
.nav ul {
margin:0px;
padding:0px;
list-style:none;
width:750px;
}
.nav ul li {
display:inline;
}
.nav ul a {
font-size:14px;
padding:3px 7px;
line-height:30px;
text-decoration:none;
font-weight:bold;
color:#ffffff;
}
.nav a:hover {
background-color:#e1b900;
}
I was also wondering, I was planning on identifying the current page that the users will be on, probably with just a different background color and text color. How would I over-ride that so that the "a:hover" still doesn't affect the current page link?
|