Home General Discussion

HTML question

ok, so, I'm redesigning my website.

I've set up a global color for hotlinks, active links, and visited links.

I wanted to use text links for my links section.

Is there a way to override the global colors for that section only?

I have all my link colors set to black because I have boarders around my thumbnails, and any other colors look bad. This turns the text links black as well. Against the dark background, they begin to dissappear.

Any suggestions without using graphic links? This is the only section I use text links on.

I don't feel like using graphic links because not everyone on my links page has graphic links, and I don't feel like going in there and creating them.

Replies

  • fogmann
    Offline / Send Message
    fogmann polycounter lvl 17
    You could make a new style for the text that needs differently colored links, and then define the hover, active, visited links for those. Something like this:

    #linkstext a:hover {
    color: #c00;
    }

    #linkstext a:visited, #linkstext a:link {
    color: #c66;
    }

    And then when you use the <div id="linkstext"> </div> for your text that needs different link color, it will override the link colors set in the page properties / body tag. You can also add more definitions to that style, like background, width, height or just about anything.
  • notman
    Offline / Send Message
    notman polycounter lvl 18
    ^^ What she said. Basically you want to use CSS code to control your text colors.
  • skankerzero
    ah cool, thanks guys. Hopefully this will work.

    I'm using an older version of Dreamweaver, and the CSS editor isn't that robust, or at least, I haven't been able to figure it all out. I'm new to CSS.

    ** edit ** Just did it, thanks! It worked great!
  • hawken
    Offline / Send Message
    hawken polycounter lvl 19
    you can make just about anything have different rollover properties in this manner, just give that item a class and then in your css code re-paste the class with "a:hover" behind class name.

    theres various tricks like this. One I use quite frequently (but doesn't parse as "proper" xhtml) is the TD TD trick to give me sub menu icons.
Sign In or Register to comment.