Different a.hover colors?

  • Anonymous


    Hey, its me again :O

    Im wondering, is it possible to add different colors for links? I tried it thrue class attribute with :

    class=”admin” to the “a” tag..

    with css : a.admin:hover {font: 10px verdana; color: #ff4040; text-decoration: none;}

    its at SEARCH WEAVER on http://www.dota2hook.de/guides/helden




    Kenneth John Odle


    Yes, you can do this. The correct code goes something like this:

    a:link {color:#FF0000;}
    a:visited {color:#00FF00;}
    a:hover {color:#FF00FF;}
    a:active {color:#0000FF;}

    Check out this page: http://www.w3schools.com/css/css_pseudo_classes.asp. Be sure to get them in the correct order in the CSS or they won’t work properly.

    To see a really extreme (and extremely cool) example of what you can do with these, see this site: http://www.kremalicious.com/.




    dunno man. It seems im 2 Stupid, or the theme is too mighty πŸ˜€

    I think it overrides the onces, i write!


    <br />
    a.external:link {color: #0000ff; font-size: 18pt; font-weight: bold; }<br />
    a.external:visited {color: #894f7b; font-weight: bold; }<br />
    a.external:hover {text-decoration: overline; background-color: #003399; }<br />
    a.external:active {color: red; }<br />

    test link:

    <br />
    <p style="text-align: center;"><a href="www.dota2hook.de/guides/heroes/weaver">Weaver</a></p><br />

    result: zero πŸ˜€

    cant seem to figure it out πŸ˜›

    ps i seem 2 be too stupid for making it like a code here as well :X


    Syahir Hakim


    CSS styles don’t need line breaks, i.e. those <br /> tags. Remove them.



    There are no breaks. Somehow buggy thrue ur ... thingy!

    sitll cant figure it out, how to make 2 for 1 website tho ;X


    Kenneth John Odle


    Where are you entering this code? I’m not finding it anywhere on your page.



    I got it. I figured out, even after clearing my cache, that it needs some time to work. Dont ask why. RESOLVED! The resoult – http://www.dota2hook.de/guides/helden

    EDIT: Not sure if resolved! On my brothers Computer, it appers as standard. Can you tell me what color the a hover link is at “weaver” green? 😑


    Kenneth John Odle


    Nope, it’s not showing up on this end, either. I see this code added to the end of your style.css:

    a.external:link {color:#19BE19;}
    a.external:visited {color: #19BE19;}
    a.external:hover {color: #00FF00;}
    a.external:active {color:#00FF00;}

    a.externalRED:link {color:#790000;}
    a.externalRED:visited {color: #790000;}
    a.externalRED:hover {color: #C00000;}
    a.externalRED:active {color:#C00000;}

    And this is the code in your page:

    <li><a class="specialLink specialHover specialL specialA" href="#tar1">Intelligenz Helden</a></li>
    <li><a class="specialLink specialHover specialL" href="#tar2">Beweglichkeit Helden</a></li>
    <li><a class="specialLink specialHover specialL" href="#tar3">StÀrke Helden</a></li>

    First, use a child theme or custom CSS. You shouldn’t edit theme files because all your modifications will be lost when you update the theme, and then you’ll have to do this all over again.

    Second, you have defined classes (.external and .externalRED) that you aren’t using in your links.


Viewing 8 posts - 1 through 8 (of 8 total)

  • You must be logged in to reply to this topic.