Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Image Positioning Inside Table Problem (IE only)

Reply
Thread Tools

Image Positioning Inside Table Problem (IE only)

 
 
Tomasz J
Guest
Posts: n/a
 
      01-02-2008
Hello Developers!

I am pulling my hairs out. IE adds extra space below an image when I align
it at the bottom inside a table cell.
Firefox and Opera render as expected.

Simple example available at
http://my-picture-store.com/test/panelboxtest.htm
Any ideas? cellspacing and cellpadding is already set to zero.

Thomas


 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      01-02-2008
Well bust mah britches and call me cheeky, on Wed, 02 Jan 2008 13:06:31
GMT Tomasz J scribed:

> Hello Developers!
>
> I am pulling my hairs out. IE adds extra space below an image when I
> align it at the bottom inside a table cell.
> Firefox and Opera render as expected.
>
> Simple example available at
> http://my-picture-store.com/test/panelboxtest.htm
> Any ideas? cellspacing and cellpadding is already set to zero.


Image is inline and thus being located at the baseline. One favored fix is
to display it block.

--
Neredbojias
Riches are their own reward.
 
Reply With Quote
 
 
 
 
Thomas J
Guest
Posts: n/a
 
      01-02-2008
Thanks!

But why inly in IE?? I guess it is a rethorical question.

Tomasz


 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      01-02-2008
In article <flh5io$9nu$(E-Mail Removed)>,
"Thomas J" <(E-Mail Removed)> wrote:

> Thanks!
>
> But why inly in IE?? I guess it is a rethorical question.
>
> Tomasz


You are not explaining your problem properly. How about a real
example with a real image and some real dimensions rather than
the less than clear Xs and teensy cols...?

Please quote what you are referring to before you reply.

--
dorayme
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      01-03-2008
Well bust mah britches and call me cheeky, on Wed, 02 Jan 2008 23:08:10 GMT
Thomas J scribed:

> Thanks!
>
> But why inly in IE?? I guess it is a rethorical question.
>
> Tomasz


Um, I really don't know. Couldn't be IE does something standardized where
the others compensate or ignore it...nah.

I look at html and css specs like rubber bands. They can be stretched and
reshaped, have holes, but they're still what holds things together. No
browser today is perfect or even that close, so flexibility is a required
quality for the happy pagemaker.

--
Neredbojias
Riches are their own reward.
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      01-03-2008

"Tomasz J" <(E-Mail Removed)> wrote in message
news:flg2jo$df0$(E-Mail Removed)...
> Hello Developers!
>
> I am pulling my hairs out. IE adds extra space below an image when I align
> it at the bottom inside a table cell.
> Firefox and Opera render as expected.
>
> Simple example available at
> http://my-picture-store.com/test/panelboxtest.htm
> Any ideas? cellspacing and cellpadding is already set to zero.


Time to stop the guesswork

Do it this way:
<TD style="HEIGHT: 1px"><IMG alt="" src="index_files/x.gif"></TD></TR>
instead of
<TD style="HEIGHT: 1px"><IMG alt="" src="index_files/x.gif"> </TD></TR>

and
<TD ...><IMG alt="" src="index_files/x.gif"></TD></TR>
instead of
<TD ...><IMG alt="" src="index_files/x.gif">
</TD></TR> ...

Note the whitespace before the </td> in each case. A space in the first one
and a newline, tab,tab or space,space in the second one.

IE incorrectly *uses* that whitespace. Modern browsers correctly ignore it.

--
Richard.


 
Reply With Quote
 
Thomas J
Guest
Posts: n/a
 
      01-06-2008
Hi Richard,

Again, my problem was unwanted space below an image aligned to the bottom of
a table cell.
See: http://my-picture-store.com/test/PanelBoxTest.htm

What I need to accomplish was placing more than one image at the very bottom
of a table cell. I did not specify this initially not knowing that it would
make a difference.

Eliminating whitespace between elements inside the table cell (<td>) solved
the problem!
- see: http://my-picture-store.com/test/PanelBoxTest1.htm.
(tested in IE, Firefox, Opera and Safari)

Thank you for your and others help.

T


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem positioning of a background image in a DIV ton ASP .Net 0 11-06-2008 12:07 PM
positioning inside a div Tarscher HTML 3 12-18-2007 08:55 AM
positioning content inside iframe phl HTML 1 09-20-2007 03:46 PM
Re: resized image in table extends table width to original image width Sean Jorden HTML 1 08-19-2003 08:59 AM
Re: width of table cells, table inside of form bbxrider HTML 0 07-14-2003 08:02 PM



Advertisments