Forum Moderators: open

Message Too Old, No Replies

Win XP IE 6 expands spacer gif too much

Looks ok in all other browsers

         

Lorel

8:54 pm on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have a table cell where I have placed a spacer gif so it will expand the width and length I want (this is going between the header and menu when I want to determine the vertical space. It looks fine in all browsers on PC and Mac except on Win XP IE 6 it expands to about 35 pixels high when it should be only 3 pixels.

<table width="760" cellspacing="0" cellpadding="0" border="0">
<tr><td bgcolor="#336699">
<img src="images/spacer.gif" width="760" height="3" border="0" alt="spacer gif">
</td></tr></table>

If there is a better way to do this that will work in Win XP please let me know.

j4mes

8:56 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



Have you tried style="width: 760px; height: 3px;" added to the image tag?

Lorel

9:16 pm on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can you explain why:

style="width: 760px; height: 3px;"

added to the image tag is needed when the dimensions are in the image tag already?

2by4

9:37 pm on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try this:

<table width="760" cellspacing="0" cellpadding="0" border="0">
<tr><td bgcolor="#336699">
<img src="images/spacer.gif" width="760" height="3" border="0" alt="spacer gif"></td></tr></table>

That removes the newline, which depending on settings can be considered to be equal to a <br> within the td.

j4mes

8:17 am on Aug 2, 2005 (gmt 0)

10+ Year Member



Can you explain why:

style="width: 760px; height: 3px;"

added to the image tag is needed when the dimensions are in the image tag already?

It isn't needed (and definitely shouldn't be), but if IE is ignoring the usual attributes I figured it might be worth a shot, for example if other CSS is overriding the attributes :-)

outrun

9:04 am on Aug 2, 2005 (gmt 0)

10+ Year Member



I wouldnt use a spacer image all together just specify it with css.

<table width="760" cellspacing="0"
cellpadding="0" border="0">
<tr><td style="background-color:#336699;height:3px">
</td></tr></table>

Lorel

3:39 pm on Aug 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks 2x4 that worked like a charm!

last comment:
>I wouldnt use a spacer image all together just specify it with css.

The problem with this is that some Netscapes don't render style. but thanks anyway.