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

Home Forums CSS Make css selector apply to proceeding css element

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


    I have a full screen menu overlay when a user clicks the menu icon. O want the background image below the menu to become blurry when a css class is applied to menu, say class “active”. But the background image is “higher” up in the html than the menu. how do I get the css to apply to a proceeding element. It’s like this:

    <div> item item item </div>

    Heres the link if you need the non-hypothetical example:
    I want to add a css blur filter to “.front-page-1” when “jumbo-menu-button” has class “jumbo-menu-button-active” added to it.


    Basically, you can’t.

    There is no “previous sibling” selector or a “parent” selector.

    You need javascript…or Jquery…then it’s easy.

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