Welcome to WebmasterWorld Guest from 54.166.112.74

Forum Moderators: incrediBILL

Message Too Old, No Replies

How can I make an Entire List Item Clickable ?

   
8:17 am on Jun 25, 2012 (gmt 0)



How can I make an Entire List Item Clickable ?
8:31 am on Jun 25, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



<li><a href="/path/file" title="pop up title">anchor text</a></li>
4:19 pm on Jun 25, 2012 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Right, don't jump through hoops to make an unnatural object a link. You can, but the anchor is the natural element for this.

Whatever styles you have on <li> to render its display, apply those to the anchor instead. Hint: anchors are inline by default, you might have to set display:block.
4:27 pm on Jun 25, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



It's quite natural for each list item of a list to be a separate link. I can think of several scenarios beyond the standard navbar code.
3:44 pm on Jun 26, 2012 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I mean the anchor is the natural element for a hyperlink, not the list item itself. You'd have to use Javascript to make the list item "clickable" without an anchor, which makes it Javascript dependent, blah blah blah . . . :-)