3 replies [Last post]
maxl
maxl's picture
Offline
Regular
United States, Fort Collins, CO
Last seen: 14 years 33 weeks ago
United States, Fort Collins, CO
Timezone: GMT-6
Joined: 2007-06-25
Posts: 20
Points: 0

Hey everyone.


I have a horizontal menu displayed about 97px from the top of the browser window. Above this are two divs, the left one displays an image and is displayed Inline, the right one displays another image and a small form. My navigation menu is a <ul> and its position is relative.

What im seeing in IE is my navigation is off by a couple pixels on the top like there is a margin, but FireFox displays it fine.

I've removed the left <div> above the menu and everything is displayed fine, however, the <div> doesn't contain any padding or magins or borders and is just a simple <img> inside an . Where are these extra pixels comming from?

-here is a link to the site:
http://www.markeyforcongress.com/drupal/
-here is the CSS for the nav menu:

#navMain { width: 800px; height: 29px; margin: 0px; margin-left: 10px; position: relative; top: 0px; left: 0px; border: 1px solid black;}
/*#navMain { background-color: yellow; width: 800px; height: 29px; margin: 0px; margin-left: 10px; position: relative; top: 97; left: 235; border: 1px solid black;}*/
#nav ul { padding: 0px; margin: 0px; list-style: none; }
#nav a { display: block; color: #404B55; font-weight: bold; text-decoration: none; padding: 0px 10px; }
#nav li { float: left; padding: 0px; margin: 0px; font: normal 14px/29px Arial, Helvetica, Sans-Serif; }
#nav li#Donate a { color: #fff; background: #C63B1C; }
#nav li#Donate a:hover { color: #C63B1C; background: #DFEBF6;}
#nav li a:hover { color: #404B55; background: #DFEBF6; }

I've left a border so its easier to see whats happening. I can't figure out this problem. I simply don't have enought knowledge of CSS yet to understand whats happening.

Thanks for your help everyone.

Edit: code tags added and '<' converted to entities; please check guideline stickies.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 23 weeks 3 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Quirks

let's get rid of that comment first, anything before the DTD throws IE into Quirks Mode ;)

Verschwindende wrote:
  • CSS doesn't make pies

maxl
maxl's picture
Offline
Regular
United States, Fort Collins, CO
Last seen: 14 years 33 weeks ago
United States, Fort Collins, CO
Timezone: GMT-6
Joined: 2007-06-25
Posts: 20
Points: 0

Oops!

Well, guess what? That did that trick! If only i was refreshing the pages on any other page besides the front-page, they all have that comment removed! And it would have saved me some time. But now IE is happy and displays correctly.

Thanks for the second set of eyes.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 23 weeks 3 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Superb, thanks for letting

Superb, thanks for letting us know Wink

Verschwindende wrote:
  • CSS doesn't make pies