views:

39

answers:

3

For some reason this site displays fine in all browsers but IE6. In IE6 the top navigation does not display at all... Any help would be much appreciated:

I have placed the code below (I had to take out image urls to post):

<div id="nav">
  <ul>
    <li class="floatLeft" id="contact">Contact</li>
    <li id="about">About</li>
    <li id="resume">Resume</li>
    <li class="floatLeft" id="work">Work</li>
  </ul>
</div>

I am using a linked css sheet with the following definitions as well:

#nav {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  height: 50px;
  width: 214px;
  position: absolute;
  text-decoration: none;
  list-style-type: none;
  left: 780px;
  right: auto;
  margin: 0px;
  padding: 0px;
  top: 52px;
  z-index: 800;
  zoom: 1;
}

#nav ul {
  margin: 0px;
  padding: 0px;
  list-style-type: none;
  display: block;
}

#nav ul li {
  float: left;
  overflow: hidden;
  text-decoration: none;
  padding: 0px;
  text-indent: -9000px;
  margin-top: 0px;
  margin-right: 10px;
  margin-bottom: 0px;
  margin-left: 0px;
}

#nav ul a {
  display: block;
}

#nav #contact a {
  background-position: left top;
  width: 43px;
  background-repeat: no-repeat;
  background-image: url();
  height: 50px;
  text-decoration: none;
}

#nav #about a {
  width: 44px;
  background-image: url();
  background-repeat: no-repeat;
  height: 50px;
  background-position: left top;
  text-decoration: none;
}

#nav #resume a {
  background-repeat: no-repeat;
  height: 50px;
  width: 43px;
  text-decoration: none;
  background-image: url();
}

#nav #work a {
  background-repeat: no-repeat;
  width: 44px;
  background-image: url();
  height: 50px;
  background-position: left top;
  text-decoration: none;
}
A: 

Do you have a complete valid doctype in your HTML? Sometimes IE goes into quirks mode and does weird things without one... just a thought.

Logic Artist
Just use <!DOCTYPE html>. That is all you need to throw the browser in to standards mode, regardless of if you're using HTML 4.01, 5, or XHTML 1 or 1.1
Chris Sobolewski
yes here is the code from the top of my site:<!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">
ReidHawkins
+1  A: 

It can't have been displayed in the other browsers either, since you got text-indent: -9000px; in #nav ul li. This pushes the whole thing out of view.

Additional:

Is the width: 214px; in #nav really necessary? It pushes down the #work LI.

Gert G
To add to this, add a border to #nav, you should see that your DIV is in fact there, but the text has a large negative indent.
Chris Sobolewski
that is just the text; I have images in there.... thanks for the comment though!
ReidHawkins
I see. See my additional comment above. Firefox 3.6.6 and IE6 displays the page in the same way.
Gert G
A: 

The problem might be the floated <li> elements and how they interact with the containing <ul>. I might try giving the <ul> a defined height or perhaps overflow:auto.

fisherwebdev