Log in

View Full Version : IE image padding Problem!!



psilos
02-01-2007, 01:27 PM
IE exeplorer adds at defaults a padding(margin?) after the img elements?
How can i remove this without affecting and other browsers (FF) that have no problem?

I tried padding:0;margin:0; but no lack...

The only thing that seems to work for IE is negative margin, but then affects
other browsers...

and of course i don't want to do this by absolute position.

Thanx in advance!

P.S.:e.g I want to cut a big vertical image at two slices and put one under the other and right of them some text. So i want them to look like one.

jscheuer1
02-01-2007, 05:41 PM
IE has always had a quirk about images. Unless you put the tags together with no white space between them:


<img src="some.gif"><img src="another.gif">

IE will put some in there. Technically, this is correct as, an image is an inline element. As such it is like text. If you have a space between two letters in your markup, you see it in the layout.

If you have this:


<img src="some.gif"><br>
<img src="another.gif">

There will be no space between them vertically, as long as there are no trailing or leading spaces on the lines in the markup.

psilos
02-02-2007, 09:00 AM
Thanx man,

It worked, and i haven't thought of that simple thing
inline element.