DEV Community

Discussion on: Creating a fold out navigation with CSS only

Collapse
 
dabeatsmith profile image
dB Smith • Edited

Would you be able to link a button element to the input?
I may play around with the idea later but to be semantic seems like we could wrap the input in a button parent element

Collapse
 
cydstumpel profile image
Cyd

Unfortunately no, the for attribute only works on the label element and that’s how we link the input and label. Also if you wrap the input in an element you can no longer use sibling selectors to show and hide the navigation πŸ˜”.