Jump to content

Image creating whitespace in IE


JustGotAQuestion

Recommended Posts

So heres what i have, basically (not exactly, but don't worry about that):

 

<div style="float:left; height:25px;">

<p>Words</p>

</div><img src="img.gif" border="0" height="25" />

 

<div>

<p>Words</p>

</div>

 

In addition to this, there are some classes that tell things to snug up (margins:0 and padding:0 mostly).

 

Now, in Mozilla, it does exactly what i want. The bottom of the first div+image is flush with the top of the second div. But, in IE, there is a gap. If i remove the image, it is flush in both. So this makes me think that explorer has a default something or other for images that creates this space. I tried setting the image's margin and padding to zero, but no luck.

 

I did manage to fix it, but it broke something i need somewhere else, so i need another solution. Just FYI, the fix was floating the image right.

 

Is there anything anyone can think of?

Link to comment
https://forums.phpfreaks.com/topic/102451-image-creating-whitespace-in-ie/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.