Let’s say I have some hyperlink but class and id of it are already used by other scripts. So how can I add some css to them ? I tried 2 things.
<div class='some_css'>
<a href='".$_SERVER['PHP_SELF']."' class='used' id='used1'>link1</a>
<a href='".$_SERVER['PHP_SELF']."' class='used' id='used2'>link2</a>
</div>
///css file
.some_css:a
{
color:#456e9c;
}
Another try
<span class='some_css'><a href='".$_SERVER['PHP_SELF']."' class='used' id='used1'>link1</a></span>
<span class='some_css'><a href='".$_SERVER['PHP_SELF']."' class='used' id='used2'>link2</a></span>
///css file
.some_css:a
{
color:#456e9c;
}
Both are wrong…..
I know I do something wrong, please help
Use a space, not a colon (
:). Colons are meant for stuff like pseudo-classes/elements, and properties.