Anchors in CSS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smartino
    New Member
    • Feb 2008
    • 6

    Anchors in CSS

    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
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    In your CSS:
    [code=css]
    #heading1 {text-decoration:unde rline;color:blu e}
    #heading1 a {text-decoration:none ;color:red}
    [/code]

    Comment

    • smartino
      New Member
      • Feb 2008
      • 6

      #3
      Thanks! this worked great!

      Comment

      Working...