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

Home Forums CSS Pseudo-element question

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

    Hi, is there any way I could put a :hover statement on an :after element.

    Something like this: #menu:after:hover {content:” “;}

    I know that one isn’t possible but I presume you get the point.


    Here’s a quick example of a test that works:


    Hmm, weird it didn’t worked for me. Thanks man


    What browser are you looking in?

    Chris Coyier

    Just remember pseudo element has to come last.


    Well I see now that your fiddle wasn’t exactly what I looked for. I meant that if you have created an element form an element using after. Can you put :hover on that?

    What I mean. If you have two boxes, the first one is “.box”, the second one is “.box:after”. Can you do something if I want to change the second one when I hover over it, how do I do? Or is it even possible? Do I have to use javascript?

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