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

Cross browser menu border problem 2

Status
Not open for further replies.

k4ghg

Technical User
Dec 25, 2001
191
US
Hi - I am working on a menu and have incountered a prblem with the border. The code works fine in FF, but not in IE 6. Any suggestions would be appreciated. Thanks...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
<html xmlns=" xml:lang="en" lang="en">
<head>
<title>Test Menu</title>

<style type="text/css">
* {
padding: 0;
margin: 0;
}

#menu {
display:block;
font-weight: bold;
top:8em;
left:1em;
position:fixed;
border:1px solid #888;
width:99px;
text-align:center;
font-size: 80%;
font-weight:bold;
text-decoration:none;
list-style: none;
padding:0;
}

* html #menu {
position:absolute;
}

#menu a:visited, #menu a {
display:block;
width:100px;
height:20px;
margin:0 auto;
border-top:1px solid #fff;
border-bottom:1px solid #000;
text-align:center;
text-decoration:none;
line-height:20px;
color:#000;
padding:0;
}

#menu a:hover {
background:#aaa;
color:#fff;
}

</style>

</head>

<body>


<div id="menu">
<li><a href=" title="Home">Test 1</a></li>
<li><a href=" title="Home">Test 2</a></li>
<li><a href=" title="Home">Test 3</a></li>
<li><a href=" title="Home">Test 4</a></li>
<li><a href=" title="Home">Test 5</a></li>
<li><a href=" title="Home">Test 6</a></li>
</div>



</body>

</html>
 
Try putting your <li>s inside a <ul></ul> pair

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Ah - hit 'submit' too early. For any display oddities it's always worth using first - it picks up lots of problems. Once they are solved, most of the display issues remaining are fairly easily sorted

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
change:
Code:
<div id="menu">
</div>
to:
Code:
<ul id="menu">
</ul>

This should take both browsers out of quirks mode. Also, you have menu set to be both absolute and fixed. The absolute in the lower rule should over ride the fixed in the higher rule, so the rule:
Code:
position: fixed
shouldn't have any effect.


[plug=shameless]
[/plug]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top