I want to focus a button
and make a div change the display to display:flex
This is the code pen link to be easier.
https://codepen.io/Rvssco/pen/bGoERxY
Thanks in advance.
CodePudding user response:
Had to make a rearrangement in div
blocks: https://codepen.io/angelhearted/pen/wvrMjyE
- Moved
menudrop
totextBtn-wrap
div. So the second point would work - Use tilda selector:
.buttonMenu:focus ~ .menudrop { display: flex; }
- There was a typo in the last selector, "l" in "display" was missing.