By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,625 Members | 2,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,625 IT Pros & Developers. It's quick & easy.

Override HyperLink?

P: n/a
I have this in my style sheet:

a:link
{
color : #000000;
text-decoration : None;
font-weight:bolder;
}

a:hover
{
color : #333333;
background-color : Transparent;
font-weight:bolder;
}

a:visited
{
text-decoration : None;
font-weight:bolder;
}

But for a single div tag, I want to have different behaviors for all
<a> tags inside the <div>. How do I do that?

Thanks.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
br************@hotmail.com (bdwise) wrote:
But for a single div tag, I want to have different behaviors for all
<a> tags inside the <div>. How do I do that?


<div class="foo">

..foo a:link {styles}

etc.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2

P: n/a
"bdwise" <br************@hotmail.com> wrote in message
news:59**************************@posting.google.c om...
I have this in my style sheet:

a:link
{
color : #000000;
text-decoration : None;
font-weight:bolder;
}

a:hover
{
color : #333333;
background-color : Transparent;
font-weight:bolder;
}

a:visited
{
text-decoration : None;
font-weight:bolder;
}

But for a single div tag, I want to have different behaviors for all
<a> tags inside the <div>. How do I do that?


You could apply a class (or ID) to you div, and then write rules for that
class (or ID). For example:

..mydiv a:link
{
color : #ff0000;
text-decoration : None;
font-weight:bolder;
}
<div class="mydiv"><a href="#">This should be red</a></div>

Regards,
Peter Foti
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.