Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UL CSS Navigation Problem 1

Status
Not open for further replies.

Borvik

Programmer
Jan 2, 2002
1,392
US
Ok I've been trying to get this to work properly in IE for a while now, but it just doesn't want to work - not even in the more standards compliant IE7 (works nicely in FireFox though :)).

I'm creating a vertical navigation for a website, that uses an unordered list. LIs that contain an H2 are considered group headers. Eventually each LI will either be a group header or a link, but I ran into a problem before I turned them all into links.

The problem is that IE separates the list items that are links by quite a bit, and I'm unsure as to how to get it to stop doing it.

I've stripped everything out but the navigation (so now the navigation spans the entire width of the page) and it is still showing the same problem.

Here is a link to the example:


You can see the gaps surrounding Link 4 (numbers 3 & 4 are the only link items) - I would like to get those gaps removed and have it display nicely like it does in FireFox.

Anyone have any ideas?
 
Argh!

IE's whitespace bug.

Take the spaces out of the markup. IE incorrectly renders them

Code:
<li>Future Link 2</li>
  <li><a href="#">Link 3</a></li><li><a href="#">Link 4</a></li><li>Future Link 5</li>
  <li>Future Link 6</li>
  <li>Future Link 7</li>

I did that and it went away!

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Earl & Thompson Marketing - Marketing Agency Services in Gloucestershire
 
Argh is right!

Fooey. Anyone know of a workaround - besides putting them all on one line?

I'm only asking that because I know my boss is going to edit this in FrontPage [shudder], and FrontPage is then going to reformat the entire page - leaving me with the bug again.

Hoping....
 
Well Foamcow, the height: 1% did work - thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top