homepage Welcome to WebmasterWorld Guest from 54.196.77.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
How can I make an Entire List Item Clickable ?
ifuturz




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

How can I make an Entire List Item Clickable ?

 

g1smd




msg:4469144
 8:31 am on Jun 25, 2012 (gmt 0)

<li><a href="/path/file" title="pop up title">anchor text</a></li>
rocknbil




msg:4469303
 4:19 pm on Jun 25, 2012 (gmt 0)

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




msg:4469310
 4:27 pm on Jun 25, 2012 (gmt 0)

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




msg:4469698
 3:44 pm on Jun 26, 2012 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved