[web] IE and white space after images

Started by
9 comments, last by ezacharyk 17 years, 6 months ago
I was wondering if any of you have had any problems with IE putting whitespace after static images. My website looks fine in FF but in IE white space is placed after all static images. Images that are also links don't have white space. For an example of what I am talking about, open the link in my sig in IE. Anyone know how to get rid of it in IE?
-----------------------------------------------------
http://divineknightgaming.com
Advertisement
Try making your page valid xhtml and putting a space before the / in img tags. Like:

<div class="something">
not
<div CLASS = "something">
and
<img src="your_path" />
(note the space).

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

I am sorry but that did not do any thing.

But thanks forthe tip on valid xhtml.
-----------------------------------------------------
http://divineknightgaming.com
also note that IE doesn't like carriage returns for some reason.

this:

<td>
<img src="">
</td>

does not work the same as (or as good as):

<td><img src=""></td>

Thanks leiavoia!

That fixed it. That is so weird that IE puts white space where there is a carriage return. I would have never thought of that as the problem.
-----------------------------------------------------
http://divineknightgaming.com
Also, you may run across that problem in links:

GameDev Website


...may do some strange things to your spacing.
gsgraham.comSo, no, zebras are not causing hurricanes.
Quote:Original post by ezacharyk
Thanks leiavoia!

That fixed it. That is so weird that IE puts white space where there is a carriage return. I would have never thought of that as the problem.


Neither would I. I remember pulling my hair out for 3 straight days back when i was learning about table layouts. I'm always happy to help with this problem since it isn't well documented and impossible to debug if you don't know about it already.
Wow! I just tried fixing some line spacing in a previous website and it solved the spacing problem. Oddly enough, despite my willy-nilly spaces, tabs, and carriage returns throughout the table structure of my current website's code, it shows correctly.

So, thanks, leiavoia! (Also for you advice about character encoding and such in another thread!)

I wonder if there are other factors that also have to be present to cause the problem?




Also, what a great domain name, ez.
gsgraham.comSo, no, zebras are not causing hurricanes.
From my experience, it only seems to effect images in TD's. I don't pay so much attention to it now because i've gotten away from pixel-perfect graphical layouts (in favor of a more google-esque simplicity). So it may effect other elements and layout conditions, but that's the only one I know of for sure.
I've also had this problem. My solution has been to wrap it in a <div> with a fixed absolute width and height and overflow set to hidden.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

This topic is closed to new replies.

Advertisement