On 2007-04-07, torbs <to********@gmail.comwrote:
Strange behaviour in ie7.
A collegue of mine put several images into a page using JCE in Joomla.
JCE have the option to align these images and he left aligned every
single one - to create a string of images.
In Firefox these img-elements breaked when then reached the border of
the sorrounding div-element, i ie7 they continued. I removed the align-
attribute and everything looking the same in both browsers. I haven't
tested in ie6.
Setting align="left" on an img in a modern browser is interpreted as
style="float: left", as is setting align="left" on a table.
But, in quirks mode on Firefox, if you set align="left" rather than
style="float: left" on a table, it doesn't behave quite like a float
after all: a series of them next to each other will not break into
"lines" as floats would, but will stay next to each other and overflow
the container horizontally. This is a special quirk put into Firefox to
provide compatibility with the behaviour of some version of IE which did
that.
In strict mode on Firefox, align="left" on a table behaves just the same
as style="float: left".
I don't know if Firefox also applies this quirk to inline images with
align="left" in quirks mode as well as to tables. Perhaps not based on
what you're seeing, but then I don't know what DOCTYPE you have.
If you remove the align attribute, the images aren't floated any more,
but are inline. A series of inline boxes also gets broken to fit onto
lines, in a way that's similar to a series of floats.
So just don't bother with align="left" if the only things in the block
are these images. Otherwise, use style="float: left" instead.