I have a menu you can see on the top right hand side - www.balibar.co
HTML:
<div id="joinHeader" class="shadow">
<table id="indexNavigation"><tr>
<td><a id="navSearch">Search</a></td>
<td><a id="navLanguages">Languages</a></td>
<td id="activeNavLink"><a id="navLogin">Login</a></td>
</tr></table>
</div>
CSS:
table#indexNavigation {
width: 100%;
height: 25px;
font-weight: normal;
font-size: 1.1em;
border-collapse: collapse;
}
table#indexNavigation td {
text-align: center;
color: white;
width: 33.33%;
border-right: 1px solid #FFF;
cursor: pointer;
}
table#indexNavigation td#activeNavLink {
border-right: none;
}
I want to make the entire TD Clickable.
I've added cursor: pointer; to the TD but it doesn't light up except when over the words.
I tried putting the <a> outside the <td> but this didn't work.
Is there a trick to make this clickable. Will then hook this up to jQuery for a click event - e.g.:
$('td#activeNavLink').click(function() {
Just make your links inside your td tags have a width of 100%. Then they will take up the full width of the cell.
table#indexNavigation td a {
display: block;
width: 100%;
text-align: center;
}
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