424,303 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,303 IT Pros & Developers. It's quick & easy.

Help: Menu bar is 20 pixels too high on IE7

P: n/a

I am building a website for a school, but running into a display problem
between IE and CSS. (The site is http://stmary-stthomas.org/ )

The main horizontal menu bar looks just fine on Mac and PC with most
browsers.

But on the PC with IE7, the menu bar winds up about 20 pixels too high.
The menu is drawn in a DIV with class "navbar", which is inside a DIV
with class "navcontainer":
#navcontainer {
position:absolute;
top:115px; /* This works on most browsers,
but would have to be 135 for IE7 */
}

#navbar {
height: 32px;
padding: 0px 0px 0px 0px;
margin: 0;
position: relative;
z-index: 900;
float: none;
width: 100%;
font: 14px "Lucida, Verdana, sans-serif;
}
Help! Does anyone have any idea of what's wrong, *OR* how I can tweak
this to make the "top" of the menu position come out correctly on IE7?

THANKS!!!!

Kevin Killion
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <ke*************************@newsclstr03.news.prod igy.net>,
Kevin Killion <ke***@shsmedia.comwrote:
I am building a website for a school, but running into a display problem
between IE and CSS. (The site is http://stmary-stthomas.org/ )

The main horizontal menu bar looks just fine on Mac and PC with most
browsers.
....
#navcontainer {
position:absolute;
top:115px; /* This works on most browsers,
but would have to be 135 for IE7 */
>
Help! Does anyone have any idea of what's wrong, *OR* how I can tweak
this to make the "top" of the menu position come out correctly on IE7?
Put this under any stylesheet links that you have in the head

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="ie7.css">
<![endif]-->

Moreover, make sure you have no inline styles pertaining to this issue
in the body.

And now, make a new text file and call it ie7.css and type in this file:

#navcontainer {
position:absolute;
top:115px; 135px in it.

(I noticed, for the first time ever, that a notice popped up on my
screen saying you have requested I send you an email if I reply. Sorry
Kevin, but I don't talk to strange men so intimately.)

--
dorayme
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.