Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE/Netscape Problems

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Hi Folks,

Please take a look at the following page:


In particular, the pop-out navigation on the left hand side. This works fine in IE6. However when I look at the page using Netscape 7, the navigation is all over the place and when you mouseover the page jumps.

Can anyone give me some advice on the reason why this is happening.

The relevant CSS settings for the navigation are:

#nav, #nav ul
{
padding: 0;
margin: 0;
list-style: none;
float : left;
width : 123px;
}

#nav li a {
font-family: Verdana, Trebuchet MS, Sans-Serif;
font-size: 8pt;
width: 123px;
display : block;
color : black;
text-decoration : none;
background-color : #FFDD00;
border-top : 2px solid white;
padding: 2px 0px 2px 10px;
}

#nav li ul li a {
font-family: Verdana, Trebuchet MS, Sans-Serif;
font-size: 8pt;
width: 140px;
display : block;
color : black;
text-decoration : none;
background-color : #FFAA00;
border : 1px solid red;
padding: 2px;
}

#nav li
{
position : relative;
float : left;
line-height : 25px;
margin-bottom : -1px;
width: 123px;
}

#nav li ul li
{
position : relative;
float : left;
line-height : 15px;
margin-bottom : -1px;
width: 123px;
}

#nav li a:hover {
color : white;
background-color : Red;
}

#nav li ul
{
position : absolute;
left: -999em;
margin-left : 123px;
margin-top : -29px;
}

#nav li ul.member
{
position : absolute;
left: -999em;
margin-left : 123px;
margin-top : -50px;
}

#nav li:hover ul, #nav li.sfhover ul
{
left: auto;
}

Mighty
 
First, use a full DOCTYPE at the start of your page:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
I suspect your problem comes from IE's erroneous old box model, in which they include the padding in the [tt]width[/tt] of an element. Using a full DOCTYPE will correct that, though you'll have to adjust the [tt]width[/tt] amounts accordingly.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Hi Chris,

Thanks for the tip. I changed the DOCTYPE to the one that you specified and now it is completely messed.

Have a look at the page now in IE. It is no longer centred vertically on the screen and the actual content is centred - which I don't want.

How do I fix that??

Mighty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top