smerny Posted July 28, 2009 Share Posted July 28, 2009 is there a way to make a whole cell or even a whole row or table a link? the closest think i could do is put a link inside of it with display:block... but what if i want text with different properties within it? or multiple rows of text? or text and images? and still want the entire cell to be linked to a certain page? basically i want this <tr><a href...><td>stuff here</td></a></tr> without javascript if possible Quote Link to comment Share on other sites More sharing options...
haku Posted July 28, 2009 Share Posted July 28, 2009 A whole cell - yes. A whole row - no. You have the right idea on setting the link to be a block, and expanding it to the size of the cell. That will work, and in fact is the only way to do it without using javascript. If you want to have linebreaks and separate styling within the link/cell, you can wrap text in <span> tags, and use <br /> tags. Although really, unless it's tabular data, you shouldn't be using tables anyways. But that's whole different issue. Quote Link to comment Share on other sites More sharing options...
smerny Posted July 28, 2009 Author Share Posted July 28, 2009 kinda what i figured, yes it is tubular data and i was going to still use divs, but i wanted it to be dynamic.. with sizes and such for rows/columns Quote Link to comment Share on other sites More sharing options...
haku Posted July 28, 2009 Share Posted July 28, 2009 If it's tabular data, then not only is there nothing wrong with using tables, it's actually the correct thing to do, whereas using divs would not be. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.