-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Google to discontinue the Basic HTML version of Gmail next year
By Chasethebase,
- 1 reply
- 4 views
-
- 0 replies
- 5 views
-
Google Chrome 108 is coming today with lots of deprecations and improved COLRv1 support
By Usama Jawad96,
- google chrome
- (and 6 more)
- 1 reply
- 5 views
-
Get this Price Dropped Coding 101 Bootcamp Beginners Bundle for only $24.99
By News Staff,
- zenva academy
- coding 101
- (and 11 more)
- 1 reply
- 6 views
-
- 0 answers
- 3,068 views
-
Question
plasmarox
Hi all,
I've been designing a website for someone I know and I've come across some problems doing the navigation.
Basically, when I produced the code for the navigation, I put the <a href... as a child of the UL, so the whole list item <li.... would be clickable.
However, i just tried to validate it, and it doesn't validate on the grounds the "a" cannot be a child element of "ul". So I made the "a" around the text inside the "li" instead. But, obviously, now only the text is clickable not the whole "li", which is how i wanted it.
So basically, I need a way of making the whole "li" clickable and it still validating. I know you can do it by making the "li"s float next to each other, but if I do that, I can't get them the center using "margin:0 auto".
Help me please :)
Link to comment
Share on other sites
7 answers to this question
Recommended Posts