You have to display the a
inside the th
s as a block-level element:
th a {
display: block;
}
You have to display the a
inside the th
s as a block-level element:
th a {
display: block;
}
You need to set display:block
on your links in the headers. height:width attributes are ignored on inline elements;
th a
{
display:block;
background-color: Fuchsia;
/* Making the headerlinks 100% width */
width:100%;
/* Making the headerlinks 100% height ??? */
height: 100%;
}
Edit: Forgot to mention that for 100% height to work, the parent needs to have a height specified, e.g.
th
{
height: 40px;
}
Probably not plausible, but in some cases setting
th {
white-space: nowrap;
}
Gets rid of the problem altogether.
You could set an arbitrary height to each link to quite long: (6em maybe?) then set a max height on the table cell th
's to something shorter: (3em?) with an overflow hidden. This way all the links will be taller than the table cell is high but chopped off by the overflow hidden - they should all be pink and clickable. Make sure you set a display:relative;
on the th
's otherwise old versions of IE won't chop off any overflow. Good luck :)