#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    1
    Rep Power
    0

    Is it possible for CSS to specify different colors for multiple links?


    I have a website where part of the page has white text over a dark red background and the rest of the page has black text on a white background. I would like to create white-colored links (for the dark red background area) and standard blue-colored links (for the white-background area).

    Is there any way to do this with CSS? I am using a WYSIWYG editor (Golive). Any help would be appreciated!
    Last edited by Enoch; September 15th, 2003 at 02:55 PM.
  2. #2
  3. This is only a test
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Off the air
    Posts
    2,893
    Rep Power
    153
    Search this forum for 'pseudoclasses'. I remember a good example being posted here somewhere.
  4. #3
  5. No Profile Picture
    No. 4
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    UK
    Posts
    89
    Rep Power
    11

    same question....


    and the search for 'pseudoclasses' brought up nothing.....

    I am totally new to the world of CSS but have decided to take the plunge. I am setting up the site to use external style sheets and I've been trying to find the answer in tutorials on the web but can't seem to find what I am looking for. Mind you I'm looking for a lot since at the mo. I really am a bit lost with the whole thing - I just figured that I should dive right in and learn as I go. Anyway that's a whole other story (but if one of you knows of a tutorial that really gets us that are wet behind the ear up and running..........)

    Please help.....

    jim
  6. #4
  7. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,143
    Rep Power
    2493
    Check out this site for css: http://www.meyerweb.com/eric/css/ also try www.w3schools.com and their css section. Although www.htmlgoodies.com is a bit antiquidated, you can check their css section out too.

    HTH

    Jamie
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    KY, USA
    Posts
    15
    Rep Power
    0

    Re: Is it possible for CSS to specify different colors for multiple links?


    Originally posted by Enoch
    I have a website where part of the page has white text over a dark red background and the rest of the page has black text on a white background. I would like to create white-colored links (for the dark red background area) and standard blue-colored links (for the white-background area).

    Is there any way to do this with CSS? I am using a WYSIWYG editor (Golive). Any help would be appreciated!
    Well, what you're gonna want to do is use the above suggestions, and use the following type setup:

    Let's say we have the following code:
    PHP Code:
    <div class="darkredBG">
      
    This is a division with a dark red background and white text.
    </
    div>

    <
    div class="normalBG">
      
    This is a white background with black textYou could also define this style as pertaining to the <bodytag.
    </
    div
    .

    SO, the CSS is gonna look like this:
    PHP Code:
    /* Style for the actual div */
    .darkredBG {
        
    background-color #800;
        
    color #fff;
    }
    /* Style for the links inside that div */
    .darkredBG a:link {
        
    color #fff;
        
    background-color transparent;
    }

    .
    normalBG {
        
    background-color #fff;
        
    color #000;
    }
    .
    normalBG a:link {
        
    color #00f;
        
    background-color transparent;

    I think that'll do it!
  10. #6
  11. No Profile Picture
    No. 4
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    UK
    Posts
    89
    Rep Power
    11
    Thanks a lot guys - I'll have a go at those suggestions.......

    cheers,

    jim
  12. #7
  13. This is only a test
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Off the air
    Posts
    2,893
    Rep Power
    153

    Re: same question....


    Originally posted by billybonds
    and the search for 'pseudoclasses' brought up nothing.....
    Sorry 'bout that. It should be two words: 'pseudo classes'
    "Not to offend our Swedish listeners ... if we have any, that isó"
    "óBut your team's rubbish."
    (Sun webcast, Sweden vs. Paraguay)

    Who needs corporate radio?
    WeFunkRadio.com | Global Pop Conspiracy | Radio Paradise | SomaFM | The Classic Soul Network | Boot Liquor | WFMU Freeform Radio

IMN logo majestic logo threadwatch logo seochat tools logo