/    Sign up×
Community /Pin to ProfileBookmark

Spacing under images in ul li

I am trying to set up drop down menus and am having trouble with IE and FireFox, Chrome works fine.

I have an example here,
[URL=”http://nateweb.ca/preview/nav_test/topMain.html”]http://nateweb.ca/preview/nav_test/topMain.html[/URL]

Each image is housed in a table cell and for whatever reason has spacing at the bottom I have tried everything from padding, margins, display etc and the only thing that solves the space is the position attribute which them messes up where the drop down menu appears.

Can anyone help me I am having a lot of trouble with this.

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@Big_O_1_Feb 18.2011 — why are you using a table to implement a menu? Just use a list of lists and make them floated block elements. Or inline-block if you don't care about IE.
Copy linkTweet thisAlerts:
@nater51authorFeb 18.2011 — @Big O(1)

When I take them out of the table and display them as inline-blocks I get spacing all around now, not just the bottom anymore.

padding and margins don't eliminate the spacing.
Copy linkTweet thisAlerts:
@nater51authorFeb 19.2011 — I finally got things sorted out and they are working better now. Chrome is right on the money, but IE9 is now displaying the images with space between them.

This is my new code.
[CODE]<ul id="nav">
<li><a href="#"><img src="../../images/global/header/home_btn.jpg" width="77" height="29" border="0" /></a>
<ul>
<li><a href="#" style="color:#000;">About Asthma</a></li>
<li><a href="#" style="color:#000;">Treatment</a></li>
<li><a href="#" style="color:#000;">Taking Control</a></li>
<li><a href="#" style="color:#000;">Lifestyle</a></li>
<li><a href="#" style="color:#000;">Resources & Support</a></li>
</ul></li>
<li><img src="../../images/global/header/spacer01.jpg" width="17" height="29" border="0" /></li>
<li><a href="#"><img src="../../images/global/header/kids_btn.jpg" width="66" height="29" border="0" /></a></li>
<li><img src="../../images/global/header/spacer01.jpg" width="17" height="29" border="0" /></li>
<li><a href="#"><img src="../../images/global/header/allergy_btn.jpg" width="67" height="29" border="0" /></a></li>
<li><img src="../../images/global/header/spacer01.jpg" width="17" height="29" border="0" /></li>
</ul></li></ul>[/CODE]
×

Success!

Help @nater51 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...