Reply to Re: Firefox ignores img height / width?

Your name:

Reply:


Posted by Roy A. on 11/03/07 09:16

On 3 Nov, 00:24, Ben C <spams...@spam.eggs> wrote:
> On 2007-11-02, Roy A. <royarnes...@gmail.com> wrote:
>
> > On 2 Nov, 18:51, Andy Dingley <ding...@codesmiths.com> wrote:
> >> On 2 Nov, 17:17, Tomasz Chmielewski <t...@nospam.syneticon.net> wrote:
>
> >> > I noticed that Firefox ignores img height and width.
> >> > The code below points to a non-existing image (or an image which can't
> >> > be fetched).
> >> > In IE or Konqueror, we will see a 400px x 200px blank space.
>
> >> By "ignores the height of an image", just which image did you mean?
>
> > The OP did not say that height and width did refer to any image. An
> > image is an
> > replaced element. So I think he was talking about the box around the
> > image.
>
> >> You didn't supply an image, so the size of it becomes an irrelvance.
>
> > 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.

[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

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