www.webdeveloper.com
Results 1 to 4 of 4

Thread: Link Rollovers...

  1. #1
    Join Date
    Aug 2003
    Location
    In my house
    Posts
    4,004

    Link Rollovers...

    Is there a way to affect only a specified group of links with the following code?


    <STYLE TYPE="text/css">
    a:link { color: blue; text-decoration: none }
    a:active { color: red; text-decoration: none }
    a:visited { color: blue; text-decoration: none }
    a:hover { color: green; text-decoration: underline }
    </STYLE>


    The code normally affects every link on the page.
    Thousand different paths
    So many sterile ends
    I chose the Devil's path

    Never shall the sun kiss my face
    And caress me with it's burning light
    For I dwell in the shadows
    And sleep side by side with death

  2. #2
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Set a class on the links, and then set up your CSS like this:

    Code:
    <style type="text/css"> 
    a.links:link { color: blue; text-decoration: none } 
    a.links:active { color: red; text-decoration: none } 
    a.links:visited { color: blue; text-decoration: none } 
    a.links:hover { color: green; text-decoration: underline } 
    </style>
    </head>
    <body>
    <p><a href="http://www.w3c.org" class="links">Link with CSS</a></p>
    <p><a href="http://www.w3c.org">Link without CSS</a></p>

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  3. #3
    Join Date
    Aug 2003
    Location
    In my house
    Posts
    4,004
    Okay, thanks. I should have known it would be something like that, but I'm really new to CSS.
    Last edited by Paul Jr; 08-12-2003 at 01:23 PM.
    Thousand different paths
    So many sterile ends
    I chose the Devil's path

    Never shall the sun kiss my face
    And caress me with it's burning light
    For I dwell in the shadows
    And sleep side by side with death

  4. #4
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    No problem... Happy to help.

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles