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

Home Forums CSS target element doesn't respond

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

    I’m trying to do the left_warrper invisible, and after the user click on the “click me” button, then the left_warrper changes to visible, but the :target element doesn’t work for some reason

    Here’s the code example:


    You’re having issues because of the HTML structure.

    Your selector :target ~ .left_wrapper requires that the left-wrapper is a sibling of the targeted element … and it isn’t.

    Your target is inside the nav and so it can’t be selected by that CSS selector.

    You need to change the structure

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