I can't set my table row as link to something. I can use only css and html. I tried different things from div in row to something another, but still can't make it works.
Using <a> tag inside <td> One more way to make the whole row clickable is to add an <a> inside every <td> element. Along with it add hover to the row which we want to make clickable and use display: block property to anchor to make the whole row clickable.
To add hyperlinks to an existing Hyperlinks section, right-click a row and click Insert Row on the shortcut menu. You can reference these cells by their row name, which appears in a ShapeSheet window in red text. To assign meaningful names to Hyperlink.
A link is defined using the <a> tag. You can add the link text or images and another web pages.
You just put an img tag inside the table cell (< td > tag). The src attribute's value can be any valid URL of an image on the Web , local or remote.
You have two ways to do this:
Using javascript:
<tr onclick="document.location = 'links.html';">
Using anchors:
<tr><td><a href="">text</a></td><td><a href="">text</a></td></tr>
I made the second work using:
table tr td a { display:block; height:100%; width:100%; }
To get rid of the dead space between columns:
table tr td { padding-left: 0; padding-right: 0; }
Here is a simple demo of the second example: DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With