Reply to Re: Firefox ignores img height / width?

Your name:

Reply:


Posted by Ben C on 11/03/07 10:19

On 2007-11-03, Roy A. <royarneskar@gmail.com> wrote:
> On 3 Nov, 00:24, Ben C <spams...@spam.eggs> wrote:
>> On 2007-11-02, Roy A. <royarnes...@gmail.com> wrote:
[...]
>> > Why? An image is an replaced element, it's the box around that's
>> > importent. Just look at how the object element is rendered, without an
>> > image, object or other references. I really don't think Firefox should
>> > make exeptions like that. I know other browsers do that. But Firefox??
>>
>> The question is, is it still a replaced element when the image isn't
>> actually there and the alt text is displayed instead?
>
> That's a better question. If yes, it make sense that alt text is
> displayed as an replaced element. It's a mesh to sometimes display it
> as an replaced element, and sometimes display it as an non-replaced
> element.
>
>> If not, then you can make sense of what's happening by observing that
>> Firefox displays it as a non-replaced inline, and Opera as a
>> non-replaced inline-block.
>
> Slow down, 'inline-block' is CSS 2.1. The img element is an inline
> element, not an 'inline-block' element. What's next? display: auto?
> Opera, and some others displays it as an replaced inline element, not
> an non-replaced inline-block.

You may be right, but a browser can perfectly well make an img
inline-block by default-- a replaced inline-block displays exactly the
same as a replaced inline.

But I tried a little JavaScript test:

var elt = document.getElementById("one");
var style = getComputedStyle(elt, "");
alert(style.display);

And Opera does report "inline", not "inline-block", both when the actual
image is present and when it isn't.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация