Forum Moderators: not2easy

Message Too Old, No Replies

not showing on PC - border bottom, new color

works on mac IE and FF

         

sldesigns

6:46 pm on Aug 24, 2005 (gmt 0)

10+ Year Member



Can't find a solution for this one! The border:bottom on the navigation shows up thick on the mac, but is only 1px on the pc (IE 5 and 6). I've also set it up so that when you are in a section, the hover color stays for the current section (alternative breadcrumbing). Looks great on my Mac, doesn't work on the pc's I've looked at. Urgh!

some css:

/*
navigation items
*/
#topnav {
margin: 0;
background:#efeedf;
font-size:0.75em;
font-family: verdana, arial, sans serif;
text-align:right;
border-bottom:1px solid #6f6754;
letter-spacing: 1px;
word-spacing: 4px;
font-weight: bold;
}
#topnav ul {
text-align:right;
margin:0 50px 0 0;
padding:3px;
}
#topnav ul li {
list-style-type:none;
display:inline;
}
#topnav a:link, #topnav a:visited {
color:#6f6754;
padding:3px 10px 3px 10px;
text-decoration:none;
text-transform:uppercase;
}
#topnav a:hover {
text-decoration:none;
border-bottom: 4px solid #6f6754;
visibility: inherit;
}
body#tab1 li.tab1 a, body#tab2 li.tab2 a, body#tab3 li.tab3 a,
body#tab4 li.tab4 a, body#tab5 li.tab5 a, body#tab6 li.tab6 a {
color: #2a556d;
border-bottom: 4px solid #2a556d;
text-indent: 0;
}

some html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="usm_master.css" rel="stylesheet" type="text/css" />
</head>
<body id="tab2">
<div id="wrapper">
<div id="colorbar"> &nbsp; </div>
<div id="header">
<div id="topnav">
<ul>
<li class="tab1"><a href="intelprop.html">intellectual properties</a></li>
<li class="tab2"><a href="#">products</a></li>
<li class="tab3"><a href="#">news</a></li>
<li class="tab4"><a href="#">about</a></li>
<li class="tab5"><a href="#">contact</a></li>
<li class="tab6"><a href="#">home</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>

THANK YOU!

SuzyUK

9:41 am on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hmmm.. two things

add position: relative; to the <ul> which should then bring the borders back, can't get my head around it but it's something to do with inline <li> elements..

then the link code IE is treating the

a:link
and
a:visited
as more specific than
body#tab2 li.tab2 a
again methinks that's not right, but haven't got time to check right now..

the easiest solution would be to change

/#topnav a:link, #topnav a:visited
to

#topnav a

I think that should do it, but you'll need to check how the Mac treats this. With these changes it's now working Ok for me in IE, FF and Opera on PC

Suzy