Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 29th, 2005, 07:45 AM
Jim Moe
Guest
 
Posts: n/a
Default <img> display with height and width attributes

Hello,
Mozilla (suite and Firefox) ignore the height and width attributes of
<img> when the image itself is unavailable (404); only enough space is
allocated for the alt text.
Is this expected behavior for Standards mode?

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
  #2  
Old July 29th, 2005, 08:05 AM
Henri Sivonen
Guest
 
Posts: n/a
Default Re: <img> display with height and width attributes

In article <1JadnT_Jmt5TUHTfRVn-hQ@giganews.com>,
Jim Moe <jmm-list.AXSPAMGN@sohnen-moe.com> wrote:
[color=blue]
> Mozilla (suite and Firefox) ignore the height and width attributes of
> <img> when the image itself is unavailable (404); only enough space is
> allocated for the alt text.
> Is this expected behavior for Standards mode?[/color]

Yes.

--
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
  #3  
Old July 29th, 2005, 08:35 AM
Spartanicus
Guest
 
Posts: n/a
Default Re: <img> display with height and width attributes

Jim Moe <jmm-list.AXSPAMGN@sohnen-moe.com> wrote:
[color=blue]
> Mozilla (suite and Firefox) ignore the height and width attributes of
><img> when the image itself is unavailable (404); only enough space is
>allocated for the alt text.
> Is this expected behavior for Standards mode?[/color]

There's no such thing as "expected behaviour". The behaviour is
undefined as per the specifications, thus Mozilla is neither wrong nor
right.

--
Spartanicus
  #4  
Old July 29th, 2005, 06:15 PM
Chris Beall
Guest
 
Posts: n/a
Default Re: <img> display with height and width attributes

Jim Moe wrote:
[color=blue]
> Hello,
> Mozilla (suite and Firefox) ignore the height and width attributes of
> <img> when the image itself is unavailable (404); only enough space is
> allocated for the alt text.
> Is this expected behavior for Standards mode?
>[/color]

Jim,

Ambiguous.

The spec says (section 13.2), "The alt attribute specifies alternate
text that is rendered when the image cannot be displayed (see below for
information on how to specify alternate text ). User agents must render
alternate text when they cannot support images, they cannot support a
certain image type or when they are configured not to display images."
:
"Please consult the section on the visual presentation of objects,
images, and applets for information about image size, alignment, and
borders."

And that section (13.7) says, "When specified, the width and height
attributes tell user agents to override the natural image or object size
in favor of these values."

So it's a question of whether rendering alternate text supersedes or
replaces the overriding of natural image size (which is unknown in the
case you describe) by the height and width parameters.

If all of the ambiguities in the HTML specs were laid end to end....

Chris Beall, who prefers the Mozilla interpretation.



  #5  
Old July 29th, 2005, 11:55 PM
Jim Moe
Guest
 
Posts: n/a
Default Re: <img> display with height and width attributes

Jim Moe wrote:[color=blue]
> Hello,
> Mozilla (suite and Firefox) ignore the height and width attributes of
> <img> when the image itself is unavailable (404); only enough space is
> allocated for the alt text.
> Is this expected behavior for Standards mode?
>[/color]
Thanks for your responses. Yes, the spec was curiously silent on this
aspect.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles