r/csshelp • u/kamereonesec • Aug 02 '16
Help with navigation menu
I have a navigation menu and I would like it so that the entire <li> is a clickable link. Right now it is only clickable on the text.
I would also like to add a submenu to the links if that is possible.
This is what I have right now http://codepen.io/anon/pen/dXqJdp
6
Upvotes
2
u/gavin19 Aug 02 '16
Only the text is clickable because that's the link. You can't make an
liclickable.I see you've got
width: 100%;in thenav ul li ablock. Links are inline elements, i.e they havedisplay: inline;applied by default. Those elements with that display type will ignore height/width properties.If you replace
width: 100%;withdisplay: block;it'll make the links automatically fill the width of theli.