Jump to content

Too much spacing in <UL> list in IE


doaner6

Recommended Posts

I have created a custom <UL> for our site - it looks fine in all browsers except IE. In IE, however, there are extra spaces in the <UL> between the lines that should not be there.The URL is http://www.marketinggeneral.com/default.asp?section=22Here is the HTML

<ul id=navcontainer><li><a href=http://www.marketinggeneral.com/default.asp?section=22>Press Releases</a></li><li><a href=http://www.marketinggeneral.com/default.asp?section=23>Speaking Engagements</a></li><li><strong><font color=003399>Case Studies</font></strong></li><li><a href=http://www.marketinggeneral.com/default.asp?section=25>Demos</a></li><li><a href=http://www.marketinggeneral.com/default.asp?section=26>Direct Marketing Tips</a></li><li><a href=http://www.marketinggeneral.com/default.asp?section=40>MGI Tipster</a></li></ul>

Here is the CSS

#navcontainer{list-style-type: none;background-color: #99ccff;font-family: verdana, sans-serif;font-size: 11px;line-height: 1.8em;}#navcontainer a{list-style-type: none;background-color: #99ccff;font-family: verdana, sans-serif;font-size: 11px;line-height: 1.8em;display:block}#navcontainer a:visited{color: #003399;text-decoration: none;}#navcontainer a:active{color: #003399;text-decoration: none;}#navcontainer a:hover{color: #003399;text-decoration: none;background-color: #d1e8ff;border-color: #003399;border-bottom-width: 0px;border-left-width: 0px;border-right-width: 2px;border-top-width: 0px;border-style: dotted;font-weight: bold;}

Any and all help / suggestions are welcomed!! Thanks.

Link to comment
Share on other sites

First of all, put quotes around all your attributes: <ul id="navcontainer"><li><a href="http://www.marketinggeneral.com/default.asp?section=22">Press Releases</a></li>Add this line to the #navcontainer: padding: 0;Then you can give a certain amount of padding-left if you want to.

Link to comment
Share on other sites

Thanks Ingolme - the quote thing is just because the archaic homegrown CMS we have here won't allow " without messing formatting up...I know, we're working on a new CMS anyways...I added padding for all sides, 0 for all except left, but in IE it is still coming up funky. In IE, it looks like it's not really a <UL> as there are spaces in between the <LI>, but there is nothing like that in the code -- very odd.I am not CSS whiz, but I've been trying a lot of different things but to no avail.

Link to comment
Share on other sites

There's no reason why there should be space between the list items (aside from the default line height).Maybe it's because your page isn't running in standards compliant mode. Does your page have a doctype declaration?Edit: Looking at it better, it doesn't have one. And the HTML isn't valid either. This usually can be the cause to CSS problems.

Link to comment
Share on other sites

Hmm, I guess that one would do, but I recommend either<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">OR<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">for the best results.And... you're going to have to make your pages valid HTML or XHTML, just putting a doctype won't assure your page to work right.

Link to comment
Share on other sites

Thanks for the heads up - yeah this site is a bit archaic and not valid...I appreciate the help however!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...