css text rollovers
- Started
- Last post
- 8 Responses
- CreativeFish
How do I not specify a visited link...if i do not create a a:visited state the text (once visited) defaults to Times when i want it to return to the link state
- joec0
why not just create an a:visited state and duplicate the link state?
wondering....
- joe c.
- CreativeFish0
because then the hover state doesn't work
- autonoma0
This has always worked well for me:
a:link,a:active,a:visited {
color : #BFA862;
text-decoration : none;
}a:hover {
color : #CCCCCC;
text-decoration : none;
}
- stimuli0
Try rearranging the order of the styles in the CSS file. It's suposed to be in a certain order for them to work but I can't remember it off-hand.
- stimuli0
Look at this:
- g0
it sounds like you're inheriting TimesNR from somewhere else. It might help to place the linkclass tag for your link in the actual tag e.g:
as far as the css, I define all default attributes with a font-face in the beginning.
body, p, input, td, tr, table, h1, h2, h3, a, select, option, li, lable, title, th
{font-family: Geneva, Arial, Helvetica, san-serif;
}then specify the link class with only the changed vaules, e.g. this class inherits the font-family from above and only applies the changes to the link classed attributes.
.LinkText, a.LinkText, a.LinkText:visited, a.LinkText:active
{font-size: 11px;
font-weight: normal;
color: #FFFFFF;
text-decoration: none;
}
a.LinkText:hover
{text-decoration: underline;
}
- g0
NT hid my a tag example. It should be:
<a href="yourcsslink" class="LinkText">cl... here</a>
let's see if that works.
also worth mentioning that only newer browsers support the hover psuedo class.
- chmod0
Sounds like you might have a stray comma or something. Try starting over, it might be quicker than scratching your head and staring at the same code.