PDA

View Full Version : Defining CSS for links in certain divs only...



Beau
03-11-2007, 10:30 AM
Ok, I'm stumped on this syntax error, I've simply forgotten how to do it.

Say I've got this code for links:



a:visited {
text-decoration: none;
color: #FFFFFF;
}


Trouble is, I only want that code to effect links in a certain class only... I know I've got to do something to the first line to reflect that, I've just forgotten how!

RedCrisps
03-11-2007, 10:35 AM
.cssTagName
{
a:visited
text-decoration: none;
color: #FFFFFF;
}


i think, not shure =]

Beau
03-11-2007, 10:38 AM
Nope, that wouldn't work, because you can't nest CSS like that :(

RedCrisps
03-11-2007, 10:45 AM
i tried :D

iTechnical
03-11-2007, 12:18 PM
#(container here) a:visited .include{
text-decoration: none;
color: #FFFFFF;
}



Try that :P

redtom
03-11-2007, 12:34 PM
CSS



a.name:active, {
color: #ffffff;
}


Link



<a class="name" href="#">Link</a>

iTechnical
03-11-2007, 12:37 PM
or that ^^

Beau
03-11-2007, 12:47 PM
Second one worked like a charm!

Thank you both! +rep

Want to hide these adverts? Register an account for free!