Forum Moderators: not2easy

Message Too Old, No Replies

Opera CSS Problem

         

jcrowley

2:30 pm on Oct 12, 2005 (gmt 0)



I'm having a problem getting a css to display properly in Opera. The culprit seems to be that the attributes for "banner" are overwriting/obscuring the "tnav" attributes. It displays properly in IE and Netscape, but Opera is definitely a problem.

Any help would be greatly appreciated!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Opera Test</title>
<style type="text/css">
<!--
body{
background:#CFCCC5;
margin:0;
padding:0;
border:0;
font-family:sans-serif;
position:relative;
}

#banner{
height:90px;
width:100%;
background:#FFF;
position:absolute;
top:0;
left:0;
}

#tnav{
background:#CFCCC5;
background-image:url(images/corner.gif);
background-repeat:no-repeat;
background-position:0 0;
height:35px;
vertical-align:middle;
font-weight:bold;
position:relative;
top:0px;
left:0px;
padding:0;
margin:0;
border:0;
border-bottom:3px #666 solid;
white-space:nowrap;
padding-left:15px;
font-family:sans-serif;
display:block;
width:auto;
}
#tnav ul{
margin:0,0,0,10px;
border:0;
padding:0;
vertical-align:middle;
height:35px;
}

#tnav a{
color:#000;
text-decoration:none!important;
padding:0 10px;
}
#tnav a.current{
color:#00C;
text-decoration:underline;
}

#tnav li{
/*display:inline;*/
list-style:none;
float:left;
padding:0px;
background-image:url(images/tnav-divider.gif);
background-repeat:no-repeat;
background-position:100% 50%;
margin:0;
padding-right:0px;
line-height:35px;
font-family:sans-serif;
}

#tnav .last{
background-image:none;
}
-->
</style>

</head>
<body>
<div id="banner">
&nbsp;
</div>

<div id="logo">
<a href="/"><img src="images/logo.gif" alt="." title="" name="logo" width="151" height="60" border="0"></a>
</div>
<table id="grid" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="200">&nbsp;</td>
<td colspan="2">
<div id="tnav">
<ul>
<li><a href="#" class="topnav">Link 1</a></li>
<li><a href="#" class="topnav">Link 2</a></li>
<li><a href="#" class="topnav">Link 3</a></li>
<li class="last"><a href="#" class="topnav">Link 4</a></li>
</ul>
</div>
</td>
</tr>
</table>
</body>
</html>

SuzyUK

11:09 am on Oct 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi jcrowley and Welcome to WebmasterWorld!

think it might be a z-index issue, try adding z-index: 50; to your

#tnav
to bring it in front of your Absolutely Positioned banner

Suzy

directrix

3:06 pm on Oct 13, 2005 (gmt 0)

10+ Year Member



As an aside, your #tnav ul margin values should be separated by spaces, not commas.