user6535413
user6535413

Reputation: 105

CSS after event clicked

http://codepen.io/anon/pen/GqmEAq

I am trying to make the x clicked(x is created after menu plus sign is clicked) and then bringing the dropdown back up.

I have tried

a:after:checked ~ .submenu{
  max-height: 999px;
}

I know I am close but I can't get the drop bar to go back up when the 'x' is clicked

Upvotes: 3

Views: 41

Answers (1)

Hunter Turner
Hunter Turner

Reputation: 6894

If the x is getting in the way of you opening and closing the menu, then you can add pointer-events: none; to your nav ul > li.sub > a:after.

CSS

nav ul > li.sub > a:after {
  pointer-events: none;
}

CodePen

Upvotes: 1

Related Questions