By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,451 Members | 981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,451 IT Pros & Developers. It's quick & easy.

HTML Help

P: n/a
Hi All, I know this is a javascript group, but this where the great
minds are, so I figured I would ask here.

Can anyone explain to me why the blue column in this code is
vertically higher than the rest? In Firefox, all is fine. Just in IE
do i see the extra a space.

<table cellspacing="0" cellpadding="1"><tr><td height="120px"><div
style="height:95px;"></div><div style="height:20px;">5</div><div
style="background-color:red;height:5px;"></div></td><td
height="120px"><div style="height:0px"></div><div style="height:
20px;">100</div><div style="background-color:green;height:100px;"></
div></td><td height="120px"><div style="height:20px;"></div><div
style="height:20px;">80</div><div style="background-color:blue;height:
80px;"></div></td></tr></table>

thanks in advance,
-Scott
Jun 27 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
VK
On Jun 6, 8:10 am, SirCodesALot <sjour...@gmail.comwrote:
Hi All, I know this is a javascript group, but this where the great
minds are, so I figured I would ask here.

Can anyone explain to me why the blue column in this code is
vertically higher than the rest? In Firefox, all is fine. Just in IE
do i see the extra a space.

<table cellspacing="0" cellpadding="1"><tr><td height="120px"><div
style="height:95px;"></div><div style="height:20px;">5</div><div
style="background-color:red;height:5px;"></div></td><td
height="120px"><div style="height:0px"></div><div style="height:
20px;">100</div><div style="background-color:green;height:100px;"></
div></td><td height="120px"><div style="height:20px;"></div><div
style="height:20px;">80</div><div style="background-color:blue;height:
80px;"></div></td></tr></table>

thanks in advance,
-Scott
I appreciate the compliment without implying that it should be shared
by myself as well. Yet there are some Usenet rules and OT (Off Topic)
among them. Other words each topic for its own designated newsgroup.
In your case it is a CSS exclusively matter so
comp.infosystems.www.authoring.stylesheets is the one to ask.
Jun 27 '08 #2

P: n/a
SirCodesALot wrote:
Hi All, I know this is a javascript group, but this where the great
minds are, so I figured I would ask here.

Can anyone explain to me why the blue column in this code is
vertically higher than the rest? In Firefox, all is fine. Just in IE
do i see the extra a space.

<table cellspacing="0" cellpadding="1"><tr><td height="120px"><div
style="height:95px;"></div><div style="height:20px;">5</div><div
style="background-color:red;height:5px;"></div></td><td
height="120px"><div style="height:0px"></div><div style="height:
20px;">100</div><div style="background-color:green;height:100px;"></
div></td><td height="120px"><div style="height:20px;"></div><div
style="height:20px;">80</div><div style="background-color:blue;height:
80px;"></div></td></tr></table>

thanks in advance,
-Scott
1. The 5px high red div needs overflow:hidden in the style.
2. You'll need to remove the 0px high div in the green section. IE seems
to have a problem with 0px high DIVs. Even setting overflow:hidden on
them doesn't seem to work. If you set it to 1px high it'll be fine.
Weird huh, a 0px high div is taller than a 1px high div :-)

Here's a working version:

<table cellspacing="0" cellpadding="1">
<tr height="120">
<td>
<div style="height:95px;"></div>
<div style="height:20px;">5</div>
<div style="background-color:red;height:5px;overflow:hidden;"></div>
</td>
<td>
<!-- div style="height:0px"></div -->
<div style="height:20px;">100</div>
<div style="background-color:green;height:100px;"></div>
</td>
<td>
<div style="height:20px;"></div>
<div style="height:20px;">80</div>
<div style="background-color:blue;height:80px;"></div>
</td>
</tr>
</table>
Jun 27 '08 #3

P: n/a
Weird huh, a 0px high div is taller than a 1px high div :-)
Maybe IE considers 0px size to be infinite?

Martin.

Jun 27 '08 #4

P: n/a
On Jun 6, 2:20*am, Martin <warwo...@gmail.comwrote:
Weird huh, a 0px high div is taller than a 1px high div :-)

Maybe IE considers 0px size to be infinite?

Martin.
Thank you all for the replies, and again, sorry for the incorrect
group posting, but alas, I knew I came to the right place :)

thanks again.
Jun 27 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.