Results 1 to 4 of 4

Thread: Two link colors on one page

  1. #1
    Join Date
    Mar 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Two link colors on one page

    Hey everyone. Long story short, I'm returning back to my hobby of web design. I'm ultimately trying to add additional styles to my CSS to control link colors. For example.

    Code:
    <span class="style1">Hey guys this is link color 1</span>
    <span class="style2">Hey guys this is link color 2</span>
    Can someone show me how my CSS should link in order to properly add link color, hover, text decoration and etc for 2 or more styles in one CSS?

    Thank you!

    Edit: Haha figured it out, just a little bit of research. Sorry for wasting board space!
    Last edited by Bubbletin; 03-13-2007 at 09:17 AM. Reason: Brain kicked in.

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Check the following source code especially the CSS section of it. So that you can identify different methods

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    a:link
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:none;
    color:#990000;
    }
    a:hover
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:underline;
    color:#FF0000;
    }
    
    a:visited
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:none;
    color:#990099;
    }
    
    #one a:link
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:none;
    color:#339933;
    }
    
    #one a:hover
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:underline;
    color:#FF33CC;
    }
    
    #one a:visited
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:none;
    color:#339966;
    }
    
    p a:link
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:none;
    color:#0000FF;
    font-weight:bold;
    }
    
    p a:hover
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:underline;
    color: #993399;
    font-weight:bold;
    }
    
    p a:visited
    {
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    text-decoration:none;
    color:#339966;
    font-weight:bold;
    }
    
    </style>
    </head>
    
    <body>
    <p><a href="http://www.google.com">Google</a> - This will use last 3 CSS rules mentioned in our style tag.  </p>
    <a href="http://www.google.com">Google</a> - - This will use first 3 CSS rules mentioned in our style tag. <br><br>
    <div id="one"><a href="http://www.google.com">Google</a> - - This will use middle 3 CSS rules mentioned in our style tag. </div>
    </body>
    </html>

  3. #3
    Join Date
    Mar 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much for the quick reply!

    I wanted to ask about Dropshadows in Firefox. Can I ask that in this thread or do I need to make another? Thank you again!

  4. #4
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    I think it is better if you start a new thread about it.

Bookmarks

Posting Permissions

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