Jump to content

Recommended Posts

Posted

IE 7 is such a problem causer. I can not get the navigation menu to float right. It looks staggered like a diagonal. Here is my code. Help is appreciated. It should float left. the class navul is 500px and that divided by 4 = 125 px for each link

 

 

HTML

				<ul class="navul">
				<li><a class="current" href="index.html">Home</a></li>
				<li ><a href="services.html">Services</a></li>
				<li ><a href="portfolio.html">Portfolio</a></li>
				<li><a href="contact.html">Contact</a></li>
			</ul>

 

CSS

.navul a {
display: inline-block;
width: 125px;
height: 40px;
line-height: 40px;
text-align: center;
float: left;
color: black;
border-radius: 0 0 5px 5px;
behavior: url(pie.htc);
font-weight: bold;
text-decoration: none;
}

.navul a.current {
background: black;
color: white;
}

Posted

I've seen this stagger in IE before. It's usually because the li tag needs a float: left, not the "a" tag inside it. Try adding

.navul li {
float: left;
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...