SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast avara's Avatar
    Join Date
    Oct 2001
    Location
    Look behind you!
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Having 2 sets of CCS instructions for links

    I'm just creating a site where all the links are dark blue, with an orange hover effect. However I also have a navigation bar at the top of the page where I would like the links to be white, with a light gray hover effect.

    What would be the best way of going about this?
    Urban Weigl - urban@hostit365.com
    http://www.hostit365.com - Friendly, knowledgeable customer support
    Rock solid affordable UNIX WEB HOSTING from $9.95

  2. #2
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd say contextual selectors.
    Code:
    <td class="moma">
      <a href="page">Son</a> |
      <a href="page2">Daughter</a> |
      <a href="page3">Unknown</a>
    </td>
    
    And then all you have to do in your stylesheet is:
    .moma A:LINK {
      /* Place Styles Here */
    }
    
    .moma A:VISITED {
      /* Place Styles Here */
    }
    
    .moma A:HOVER {
      /* Place Styles Here */
    }
    
    .moma A:ACTIVE {
      /* Place Styles Here */
    }
    ~~Hope This Helps

  3. #3
    SitePoint Enthusiast avara's Avatar
    Join Date
    Oct 2001
    Location
    Look behind you!
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a million, what do I owe you?
    Urban Weigl - urban@hostit365.com
    http://www.hostit365.com - Friendly, knowledgeable customer support
    Rock solid affordable UNIX WEB HOSTING from $9.95

  4. #4
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Avara, I do this all for free. I don't take no money. I take don't nothing. 'Just doing this out'a good will -- I just like helping people. Smoke me a kipper; I'll be back for breakfast...

    *Hops on stead and rides off into the sunset*

    *Greedily accepts extra SitePoint for this post...*

  5. #5
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OT
    Originally posted by Ian Glass
    Smoke me a kipper; I'll be back for breakfast...

    Red Dwarf fan?

  6. #6
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by sowen
    Red Dwarf fan?
    What makes you think that, smeghead? ;-)
    Last edited by Ian Glass; Feb 5, 2002 at 11:01.

  7. #7
    SitePoint Enthusiast avara's Avatar
    Join Date
    Oct 2001
    Location
    Look behind you!
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What are the chances of meeting another Red Dwarf fan on SitePoint eh?
    Urban Weigl - urban@hostit365.com
    http://www.hostit365.com - Friendly, knowledgeable customer support
    Rock solid affordable UNIX WEB HOSTING from $9.95

  8. #8
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the chances are quite good here, actually. The chances of finding another Red Dwarf fan in America are much lower, though. :-(

  9. #9
    SitePoint Enthusiast
    Join Date
    Sep 2001
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    seperate classes for links

    Ian:

    Is there any advantage to the way your explanation above versus this method:

    a.Textlink:link { font-family: verdana, arial, sans-serif; font-size: 10pt; font-weight: bold; color: #FFFFFF; text-decoration: underline }

    a.Biglink:link { font-family: arial, verdana, sans-serif; font-size: 14pt; font-weight: bold; color: #000000; text-decoration: underline }

    Instead of having different hover properties in these classes, I just want different sizes and colors.


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
  •