Hi, I have something annoying in IE. When i put images under eachother like <img src=1.jpg border=0> <img src=2.jpg border=0> Then IE is showing whitespace between both images an firefox not. Does someone knows how i can fix this? Cheers Kris
Try: <p> <div><img src="images/blah.jpg" /></div> <div><img src="images/blah1.jpg" /></div> </p> Code (markup):
you can also try to make sure there are no spaces between <img src=1.jpg border=0> and <img src=2.jpg border=0> like this: <img src=1.jpg border=0><img src=2.jpg border=0>
Thanks guys <div><img src="images/blah.jpg" /></div> <div><img src="images/blah1.jpg" /></div> This works fine.
For other people who may be experiencing this problem, it's a good idea to check your doctype. A strict doctype, will cause browsers to display 5 pixels under consecutive images. If you change your doctype to transitional it will go away. I looked for quite awhile yesterday to fix this problem, so the more it's posted, maybe it will save some other people some time.
In strict, IE actually follows the rules a bit. The fix is to either make img {vertical-align: bottom;} or img {display: block;}. The former if you wish img to remain an inline element, and the latter if you want it to act as a block element. cheers, gary