Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / April 2008



Tip: Looking for answers? Try searching our database.

Help:  Menu bar is 20 pixels too high on IE7

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin Killion - 24 Apr 2008 22:11 GMT
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
dorayme - 25 Apr 2008 00:19 GMT
> 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.)

Signature

dorayme

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.