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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css not looking godd on explore

Status
Not open for further replies.

orangeblue

Programmer
Nov 26, 2002
107
GB
Hi
I am trying to do a top banner and at the bottom of the banner I want to have a nav bar.

the code below works perfectly with opera and netscape, but explorer is giving me grief.
Please can anyone help

thanks
orange

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
<!--
body{
text-align:center;
}
#wrapper{
width:740px;
text-align:left;
}

#header{
clear:both;
background-color: #4b5b7c;
}


#header h1{
padding:5px;
margin:0;

}

/* horizontal nav */

#menu {
margin: 0;
padding: 0;
}

#menu ul {
border: 0;
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
clear: left;
}

#menu ul li {
display: block;
float: left;
text-align: center;
padding: 0;
margin: 0;
}

#menu ul li{
background: #fff;
width: 118px;
height: 2em;
border-top: 1px solid #ccc;
border-left: none;
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
padding: 0;
margin: 0;
color: #c30;
text-align: center;
font-weight: normal;
font-size: xx-small;
voice-family: "\"}\"";
voice-family: inherit;

}


html>#menu ul li a {
font-size: x-small;
}

#menu ul li#one {
width: 262px;
background: #fff;
/*height: 2em;*/
border: 1px solid #ccc;
padding: 0;
margin: 0;
color: #c30;
text-decoration: none;
/*display: block;*/
text-align: center;
font-size: xx-small;
voice-family: "\"}\"";
voice-family: inherit;

}


#menu ul li a:hover {
color: #000;
background: #ccc;
}

#menu a:active {
background: #c60;
color: #fff;
}

-->
</style>
</head>

<body>
<div id="wrapper">
<div id="header">
<h1>banner</h1>
</div>
<DIV id=menu>
<UL>
<LI id="one">Telephone number</LI>
<LI><a href="link">My Account</a></LI>
<LI><a href="link">Baskey</a></LI>
<LI><a href="link">Want list</a></LI>
<LI id="five"><a hef="link">Help</a></LI>
</UL>
</DIV>



</div>
</body>
</html>
 
Try adding a valid DOCTYPE to the top of your code to take IE out of quirks mode. Something like this:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
...

Hope this helps,
Dan
 
What happens and what should happen? The only difference I see in IE6 (vs ff0.9 and o7.51) is that page is centered.
 
Hi vongrunt

it's ok, its a bug in ie 5.
thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top