I currently have a div
container with a table
embedded within.
HTML:
<div id='ribbon'><table id='topMenu'>
<tr>
<td><a href='index.php'>Home</a></td>
<td><a href='links.php'>Links</a></td>
<td><a href='about.php'>About</a></td>
</tr>
</table></div>
CSS:
#ribbon {
height: 40px;
background-color: #C2F4FF;
font-size: 11pt;
line-height: 40px;
padding: 0 0 5px 20px; }
a { text-decoration: none; }
#topMenu { height: 20px; }
#topMenu td { padding: 0 10px 0 10px; }
#topMenu td:hover { background-color: red; }
Displayed is a full-height screenshot of the div
with the cursor over "Home":
I suspect that the invisible borders of the table
are causing gaps between the red area and the top and bottom of the div
. I am looking for ways to expand the td
element to full 100% height to eliminate these gaps, allowing the red cell to fill the entire height of the div
.