42 users online (1 members and 41 guests)  


  Results 1 to 4 of 4

Related

  1. how do I change text color?    Forum: CSS Forum
    Replies: 1
  2. How do I change the browser frame color?    Forum: Javascript Forum
    Replies: 7
  3. Replies: 2
  4. Replies: 5
  5. Link Color    Forum: General Discussion
    Replies: 4
  1. #1
    Neatoboy's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2008
    Posts
    9

    Change color of only one link

    I want to change the color of only one link, that will appear in a non-editable area of a Dreamweaver CS3 template.

    I used to be able to do this in Dreamweaver MX via a CSS style, but I can't get it to work in CS3.

    Here is the code I have:

    <div><a href="http://www.google.com.au" class="footerlink">Google Link</a></div>

    The size and font type in my 'footerlink' style overrides the 'Page Properties' Link settings, but the color doesn't change.
    Does anybody have any ideas?

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Change color of only one link

    Hi there Neatoboy,

    and a warm welcome to these forums.

    Change class to id.
    Here is a basic example...
    Code:
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    a:link {
        color:#f00;
     }
    #footerlink {
        color:#000;
     }
    </style>
    
    </head>
    <body>
    
    <ul>
    <li><a href="#">link 1</a></li>
    <li><a href="#">link 2</a></li>
    <li><a href="http://www.google.com.au" id="footerlink">Google Link</a></li>
    <li><a href="#">link 3</a></li>
    </ul>
    
    </body>
    </html>
    

  3. #3
    Neatoboy's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2008
    Posts
    9

    Re: Change color of only one link

    Thanks coothead, it worked! I don't think I would have worked that one out on my own!

  4. #4
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Change color of only one link

    No problem, cobber, you're welcome.



Tags for this Thread