Forums

Changing color of links for different sections (5 posts)

  1. candregg
    Member
    Posted 2 years ago #

    I'm trying to change the link colors in soem sections of the site without changing others, and having no luck.

    I've already tried changing the css to:

    body {
       [...]
       color:#FFFFFF;
    }
    
    a:link, a:visited {
       color:#FFFFFF;	text-decoration:none;
    }
    
    a:hover {
    	color:#ef4d15;
    }
    [... further down the page ...]
    
    #content a:link, a:visited {
       color:#000000;
       text-decoration:none;
    }

    to confine the link color change to that content section, however, when I do, the change applies across the entire site.

    This should be easy--any idea what I'm doing wrongly?

  2. alchymyth
    The Sweeper
    Posted 2 years ago #

    #content a:link, #content a:visited {
       color:#000000;
       text-decoration:none;
    }

    #content has to be in front of a:link and a:visited.
    ?do you not want to define a style for #content a:hover ?

  3. candregg
    Member
    Posted 2 years ago #

    That was it, sort of. It worked part of the way. I had also assigned a hover color, but left that part off of the orignal post.

    As it turns out, while the man color part works fine now (Thank you!), the hover color does not. See code below:

    #content a:link, #content a:visited {
       color:#000000;
       text-decoration:none;
    }
    
    #content a:hover {
        color:#ef4d15;
        text-decoration:none;
    }

    Any ideas? Making this hover color work in the section will pretty much finis off this site. Any suggestions would be appreciated.

  4. alchymyth
    The Sweeper
    Posted 2 years ago #

    a live link to the site could help.

  5. candregg
    Member
    Posted 2 years ago #

    Sorry, the site's still largely behind a screen until the client populates it. When it goes live it will be at http://www.aciviltongue.com.

    In any case, I was abotu to send an update to disregard my previous post. I found an errant space in the css code (# content), and as soon as I fixed that it all worked just as it should.

    Thank you very much for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic