W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: handling fallback content for still images

From: Patrick Garies <pgaries@fastmail.us>
Date: Tue, 03 Jul 2007 19:02:31 -0500
Message-ID: <468AE397.3000200@fastmail.us>
To: Robert Burns <rob@robburns.com>, public-html@w3.org

Robert Burns wrote:
> No that's fine. Thanks for trying. I'll get access to IE myself and 
> see if I can come up with anything. Somewhere I read that adding the 
> <param> as I did would get IE working. Maybe it's IE7 only. Or maybe 
> its just plain wrong (I think I got if off of Wikipedia).
> Take care,
> Rob

A brief test of…

<object type="image/png" data="object.png">
    <param name="src" value="object.png">
    <p>This is fallback content.</p>

… showed that it didn’t work; Internet Explorer 7 renders what looks 
like an empty “iframe” element instead. Neither the image nor fallback 
content is shown.

On the other hand…

<object type="audio/x-pn-realaudio-plugin" data="D0005.ra">
    <param name="src" value="D0005.ra">
    <p>This is fallback content.</p>

… /does/ work [http://www.jsgp.us/demos/D0005.html]. Maybe that’s where 
the idea for the “param” element came from.

It looks like you can get Internet Explorer to render images via the 
“object” element if you get rid of that “param” element:

<object type="image/png" data="object.png">
    <p>This is fallback content.</p>

However, the image is rendered as if it were it were in an iframe and 
includes padding/margins; as a result, there are active scrollbars 
surrounding it unless the “object” element’s dimensions are larger than 
that of the image (including the padding/margins and width of the 
vertical scrollbar). Even if the dimensions are large enough, Internet 
Explorer’s ever‐present vertical (inactive) scrollbar remains and cannot 
be suppressed via “overflow: hidden”. The frame surrounding the image 
(but not the image itself) increases and decreases in size when the zoom 
feature is used; this results in either excessive whitespace or 
scrollbars. Fallback content is not displayed; you get what appears to 
be an empty “iframe” element and an error dialog when the image cannot 
be fetched.
Received on Wednesday, 4 July 2007 00:02:53 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:16 UTC