473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

img-elements with align-attribute do not break in ie7

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.

Tor

Apr 7 '07 #1
3 4792
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.
Apr 7 '07 #2
On Apr 7, 8:10 pm, Ben C <spams...@spam.eggswrote:
On 2007-04-07, torbs <torches...@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.
I use xhtml 1.0 transitional. The fun thing is that everything looked
ok when I floated it to left in ie - nothing changed in firefox.
Firefox look ed good - as always. I don't think I am in quirks mode. I
have applied a correct doctype. Perhaps I shouls check the compat...

Apr 7 '07 #3
On 2007-04-07, torbs <to********@gmail.comwrote:
On Apr 7, 8:10 pm, Ben C <spams...@spam.eggswrote:
>On 2007-04-07, torbs <torches...@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.

I use xhtml 1.0 transitional. The fun thing is that everything looked
ok when I floated it to left in ie - nothing changed in firefox.
Firefox look ed good - as always. I don't think I am in quirks mode. I
have applied a correct doctype. Perhaps I shouls check the compat...
I just tested this, and it seems FF doesn't apply this quirk to images,
only to tables.

I think that non-wrapping is an IE quirk that Mozilla replicated for
tables in Firefox, but not for img.

You probably are putting IE into some kind of quirks mode with that
DOCTYPE.

But anyway, better to use float rather than align if that's what you
want.
Apr 7 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: bhennon | last post by:
Hey all, I have a small php script that calls a random image at the following page. http://www.2006ymcanationals.com/random.php IT WORKS IF I go directly to the above link. I am trying to...
1
by: Michael J Whitmore | last post by:
I am getting tired of losing hair over this. Here is a function that simply inserts one of three images into a document right before printing. It is called for every element that has a specific...
8
by: KS | last post by:
Just to show some code to show the consept. <img id="date" onclick="javascript:show_calendar();" src="/PlexSysWeb/images/show-calendar.gif" width=20 height=18 border=0> What i want the...
6
by: Csaba Gabor | last post by:
I have an IMG placeholder for what will normally be a tiny (6x7) img. Sometimes however, I will use a somewhat larger but still small image. How can I unset the dimensions for the <IMG...
10
by: News | last post by:
I am trying to be able to manipulate the width and height of an <img> but do not seem to be able. "Yes", I know the JavaScript will "not" manip anything, which is ok. I simply do not know how to...
9
by: b007uk | last post by:
Hi! Really need help, dont know whats wrong :( I am trying to show images using php script, it works fine, pictures are shown, but if i right click on it and choose "save picture as" it offers me...
3
by: kansaschuck | last post by:
Ok... Let me start over since I had miss labeled the other question and it ended up in phpland and I failed to follow the posting rules. Sorry, here's a rework. (hey... I just saw the html code...
3
tolkienarda
by: tolkienarda | last post by:
hi all i have a problem i have a script that i got working exactly the way i wanted it. and then i tried to intrigate it into the site and it totaly stopped working. below is the original code ...
4
by: Jon Slaughter | last post by:
I have a captcha system going and for some reason when I use <?php $s = ""; for($i = 0; $i < 10; $i++) { $s = $s.rand(0,9); } $_SESSION = $s; $fn = '/Login/Register/Captcha.php'; echo '<img...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.