Different a.hover colors?

  • Anonymous

    #1734

    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

    sincerly

    phil

    Mod

    Kenneth John Odle

    #17004

    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/.

    Ken

    Anonymous

    #17005

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

    I think it overrides the onces, i write!

    css:

    <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

    Admin

    Syahir Hakim

    #17006

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

    Anonymous

    #17007

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

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

    Mod

    Kenneth John Odle

    #17008

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

    Anonymous

    #17009

    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? 😑

    Mod

    Kenneth John Odle

    #17010

    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.

    Ken

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

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