-2
ul li a{ display: block; }
Why do you need to put the links with display block when making the menus?
-2
ul li a{ display: block; }
Why do you need to put the links with display block when making the menus?
1
In this case you don’t need it. The list tag already has the display: block; by default saved me mistake. In the case of block is not required unless you want in some way a vertical menu I think.
The difference would be by li{ display: inline;}
, because you will change the layout of the list items so that they are next to each other(horizontal).
I think that’s it. Anyway, I hope I helped.
Browser other questions tagged html css menu link display
You are not signed in. Login or sign up in order to post.
This attribute is not required, you can add a ul li to without the display block.
– RXSD
You don’t have to....
– hugocsl