Reputation: 1976
I want to apply a different hyper link style to the following two things:
<p>
tags in my #currentpage_content
div id.<h3>
tags with a .profile
class.It sounds pretty simple but i can't see to get it right..
I've tried things like:
#currentpage_content a:hover{...}
and
#currentpage_content p a:hover{...}
but for some reason that applied to my navigation bar links even though they're outside #currentpage_content's div!
I also eventually figured out you could do something like this ( i think)..
#currentpage_content a.p:hover{...}
but now the link style aren't being applied at all when they should be.
Could someone please look at the bullet points above and tell me the exact syntax/order of words i need to achieve those two bullet points?
To make response easier here's the style i'm trying to apply:
a:link, a:visited, a:hover, a:active
{
font: inherit;
color: Grey;
text-decoration: none;
border-bottom: 2px solid #d4ffaa;
}
a:hover, a:active
{background-color: #d4ffaa;}
Upvotes: 0
Views: 51
Reputation: 2416
#currentpage_content p a:hover, #currentpage_content h3 a:hover {
//put your CSS in here
}
Upvotes: 3