Welcome to WebmasterWorld Guest from 54.159.12.17

Forum Moderators: incrediBILL

Message Too Old, No Replies

How can I make an Entire List Item Clickable ?

     

ifuturz

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



How can I make an Entire List Item Clickable ?

g1smd

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>

rocknbil

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.

g1smd

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.

rocknbil

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 . . . :-)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month