i know this might seem straightforward, but i can’t solve it, im trying to make the whole list item linkable, rather than just the word home
the html code:
<a href="#page1"><li class="current">Home</li></a>
p.s. when you hover the li, background color changes, so i want that whole list item to be hyperlinked, if you get what i mean, not just the word
Wrapping a block level element (the
li) within an inline-element (a), is invalid mark-up, which has the potential to throw errors, depending on your doctype. That being the case, first change your mark-up around to:Assuming that your
liisdisplay: blockthen the following will cause theato ‘fill’ the available space:If you’re using this for a horizontal list, and the
liaredisplay: inline, then you can use the following:And style-to-taste.