Sign in to follow this  

[web] IE and white space after images

This topic is 4095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Quote:
Original post by Avatar God

Also, what a great domain name, ez.


Thanks. Its just my first two initials and my last name.

I am not worried about pixel perfect layout, I did want the swords to be flush together. It looks better that way.

I like to have code that is readable and carriage returns in the places I have them make the code easier to read. But unfortunately IE doesn't want things to be so easy. Thanks for all the help guys.

Share this post


Link to post
Share on other sites

This topic is 4095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this