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

Anchors in CSS

P: 6
To the group,

I have the following statement:

<h1 id="heading1">
<a href="http://www.w3.org/">World Wide Web Consortium</a>
</h1>

What I am trying to accomplish is for the text "World Wide Web Consortium" to be a different color than the underline for the "a" element? Is this possible? I want to do this using a external style sheet...

thanks

Steve
Mar 5 '08 #1
Share this Question
Share on Google+
2 Replies


drhowarddrfine
Expert 5K+
P: 7,435
In your CSS:
Expand|Select|Wrap|Line Numbers
  1. #heading1 {text-decoration:underline;color:blue}
  2. #heading1 a {text-decoration:none;color:red}
  3.  
Mar 5 '08 #2

P: 6
Thanks! this worked great!
Mar 7 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.