Accessibility

CSS Advisor

Full-Height Flash Bug

by CSSAdvisorAdmin on October 17, 2006
Edited by: Amy C Taylor on November 24, 2009
Avg Rating 3.6 (8)   |   Log in to rate post.

Tagged with Firefox 1.0 , Netscape 7 , Firefox 1.5 , Width/Height , Netscape 8

Problem

A Flash movie with a height of 100% will not fill the available browser's space unless its parent container's height is also set to 100%.

Solution

Set height of parent container (html, body or containing p/div) to 100%.

Detailed description

Dreamweaver recently corrected its doctype insertion, which means many developers now (finally!) use correct doctypes, complete with a URL to the relevant DTD. Across the board, this means stricter formatting, which is a good thing. In Mozilla browsers however, it means that fullscreen SWFs no longer render correctly.

By fullscreen SWFs, this refers to SWFs whose width and height attributes are set to 100% in the HTML's object/embed elements. With valid doctypes in place, browsers such as Firefox and Netscape show fullscreen SWFs at roughly one fifth the size they ought to be: they look like postage stamps when they should fill the whole viewport.

Advice is often given to simply delete the doctype. While quirksmode does visually "fix" the issue, the price paid is.... well, quirksmode. This isn't the best solution. The following CSS rule corrects Mozilla's interpretation, in spite of the doctype.

<style>
   html, body { height: 100%; }
</style>

(Reported by David Stiller)




Text ID: FULL_HEIGHT_FLASH



Comments (3)

To add a comment, please Log in.




Another Issue

The CSS rule stops working again for Mozilla when I set the media type to print:

<link href="abc.css" rel="stylesheet" type="text/css" media="print" />

Is there a workaround for this as I need to set media to print in order to prevent users from printing my web page.

Many thanks.

THX

Thank you

Thank you

Tried it and its working
we should start using correct doctypes and complete with a URL to the  
relevant DTD





CSS Advisor home
Submit a post

rss

CSS ADVISOR RSS FEEDS
Recent: POSTS | COMMENTS | EDITS


Browsers
Internet Explorer (45)
Mozilla/Firefox (16)
Opera (7)
Safari (13)
CSS Properties
Background (6)
Border (3)
Color (1)
Float (15)
Font (1)
Margin (6)
Padding (4)
Position (15)
Text (13)
Width/Height (9)