Forum Moderators: open
Rather than use table borders, I like to draw horizontal seperators using the following:
<TR height="1" bgcolor="black"><TD></TD></TR>
It's quite straightforward code. Sometimes there's a colspan, and sometimes I use HTML colour codes rather than names, but it makes no difference.
I can use the IDENTICAL code several times within the same table, and sometimes they render as single-height lines and sometimes they expand to around 5 or 6 pixels high. Nothing I seem to do creates consistency.
I have used copy & paste to guarantee nothing is different between each occurrence.
Is this a known 'feature'?
If you have images in your table try doing this in your CSS and see what effect it has:
td img {
display: block;
}
It eleminates extra 'white space' by telling the browser to display all images in <td> tags as block level elements rather than inline.
It's the culprit for many a tables/images problem with the 'newer' browsers but, it's not a mistake.
Otherwise, (and a good idea anyway) specify a border on the td tags instead using a class like this:
.tdborder {
border-bottom: 2px solid #000000;
}
<td class="tdborder">blah</td>
I'm afraid I probably don't 100% get your problem but maybe the above will give some insight in how you might tackle it...
Good luck!
Nick
<spacer type=block width=100 height=1>
moz always seems to like to make the lines bigger than IE but, it still works.
Nick's idea is more elegant and what I would recommend but this is another uglier way.
G1SMD - You're right about the being used to ensure that there is *something* in the cell but as stated by PISKIE it does lead to rows rather deeper than 12 pixel.
I always find it amazing what I can learn even when I think you know what you're doing, so thanks again everyone.
I must admit to still being unsure as to what the problem was as some occasions where I have used the EXACT SAME code to do a 1 pixel high TR as mentioned previously continue to work without needing changing (I'll do it anyway).
Ah, the vagaries of multi-browser support ...