Forums

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
    Posts
  • #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.

    #89537
    TheDoc
    Member

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

    http://jsfiddle.net/BT7H4/

    #89553

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

    #89555
    TheDoc
    Member

    What browser are you looking in?

    #89567
    Chris Coyier
    Keymaster

    Just remember pseudo element has to come last.

    #89621

    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.