The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Hover effect problem

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #41511

    I have something of this sort:

    ul class="menu"
    (a href="#"(span class="menu-entypo")⌂(/span)Home(/a)

    I want to get the entypo font-icon to turn a color while the home text turns another color on hover over the a link. How do i do that ? Better yet, can i do that? I searched google but i can’t seem to find a way to do this and so i thought where else to find an answer then here sooooo here i am. Can anyone help me?

    Andy Howells

    EDIT: Hang on I reread your question. You want the regular text and the icon to be different colours?

    That’s actually a good one.

    How is the entypo character being loaded right now? Is it done via :before?

    If so you could chain the selector; { color: red; }


    That is exactly what i want. I want the icon and the text to be different colors when i hover the link they are within.
    So far i load the icon via a span before the home text. I haven’t really tried it with :before yet, although i hear this is the best way to use it. The reason i haven’t tried it like that is because i thought writing it my way would be easier to actually do what i wanted it to do.
    I will try your method and i will get back to you as soon as i can. Unfortunately my day job takes a lot of my time. I bet you don’t have a lot of accountants members around here :))


    Hey Kaladan,
    This might be one way to do it: [hover two colors]( “hover two colors”)

    li a:hover {
    color: red;

    a:hover .menu-entypo {
    color: green;

    I tried to solve it without the span – but could not


    This is excellent. Exactly what i needed. Thanks a lot Magnus_vb. Now that i see it, it seems quite easy but, by God, i wouldn’t have come up with this solution to save my life.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.