Forum Moderators: not2easy

Message Too Old, No Replies

CSS on PC browser problem

Links with CSS on PC go back to default browser color (blue)

         

LSnyder

9:34 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



We have a style sheet for our test website. On a MAC, the style sheet follows EXACTLY what we tell it. On PC browsers (netscape and IE) after a link is clicked, the top navigation goes back to the default BLUE color, instead of white. you can see this problem on our test site .... on the GREY tabs.

PC USERS, please click on one of those tab links and then go back to the page, you will see that the link will stay default blue.

WHAT IS THE PROBLEM? HOW CAN WE FIX THIS?

HERE IS THE STYLE SHEET WE ARE USING:
a:link {
color: #0033CC;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-decoration: none;
}

a:visited {
color: #0033CC;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-decoration: none;
}

a:hover {
color: #0033cc;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
text-decoration: underline;
}

a:active {
color: #FFFFFF;
}

a.hidden {
color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-decoration: none;
}

a.hidden:visited {
color: #FFFFFF;
}

a.hidden:hover {
color: #FFFFFF;
text-decoration: underline;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}

a.hidden:active {
color: #FFFFFF;
}

a.nav:link {
color: #000000;
padding: 0px;
font-weight: bold;
text-decoration: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
}

a.nav:visited {
color: #000000;
padding: 0px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
text-decoration: none;
}

a.nav:hover {
color: #0066FF;
padding: 0px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
}

a.menu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
}

a.menu:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
letter-spacing: 0px;
color: #CCCCCC;
text-decoration: none;
}

a.box {
padding: 0px;
background-color: #FFFFFF;
text-decoration: none;
border: thin none #FFFFFF;
color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
}

a.box:hover {
color: #FFFFFF;
padding: 3px;
text-decoration: underline;
background-color: #666666;
border: medium solid #3366FF;
color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.text {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
text-transform: none;
}
.ubernav {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #666666;
text-decoration: none;
}
.header {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
text-transform: none;
color: #0033CC;
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
color: #000000;
}

a.ForgotPassword:link {
color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-decoration: none;
}

a.ForgotPassword:visited {
color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-decoration: none;
}

a.ForgotPassword:hover {
color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
text-decoration: underline;
}

[edited by: SuzyUK at 8:10 am (utc) on Oct. 27, 2004]
[edit reason] sorry no URLs : see TOS #13 [webmasterworld.com] [/edit]

Reflection

10:17 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



First, its against the terms of service to post links to your website.

Second, 80% of your css code is redundent. You do not need to declare the font-family, size, weight, color and text-decoration for every property and class. The 'C' in CSS is there for a reason :).

Third, I'm not sure which class you are having problems with but the 'menu' and 'box' class do not have a :visited pseudo-class. Could that be the problem?

LSnyder

10:42 pm on Oct 26, 2004 (gmt 0)

10+ Year Member



first: i'm sorry about the link, i only used it because i knew people would ask I DONT UNDERSTAND WHAT YOU MEAN, and it's easier to understand when you see it...

second: we used dreamweaver to produce the style sheet so it automatically made everything

third: if you have a PC, you can take a look at the page, it's an active link problem i think.