Oscar Trelles
1Mar/050

Quick Tip for Flash on Firefox (Revisited)



Yesterday, I was saying there was a simple solution to overcome an apparently simple issue ocurring on Firefox, when attempting to make a Flash movie strecht its height to the available space in the browser window, using the height parameter of the object and/or embed tags. I offered a CSS solution, but, as noted by Brajeshwar, I took for granted the understanding of the trick, and failed to explain that there's more to it than just throwing in the hack.

First of all, Firefox is most respectful of standards, and will take seriously whatever doctype you declare on your HTML document. As a matter of fact, if you are using the page to ONLY contain a SWF file, you could just not declare a doctype and avoid the problem altogether. However, not declaring a doctype means that the browser will render your HTML in a 'pre-standards' way, which might not be what we need either, especially if the HTML document contains more than just the SWF file; this is where my proposed workaround enters the stage.

body, html {
height: 100%;
overflow: hidden;
}

Here we are forcing the recognition of height (or rather a percentual height) as a valid attribute of the body and html tags, thus granting them access to all the vertical space available in the browser window, without affecting anything else determined by the doctype in place. Now, I accept is not pretty, however, I think it is not a crime to bend the strictness of the standard whe it doesn't kill anybody, just know what you are doing.

Thanks to Brajeshwar for reminding me of my responsibilities as a community blogger.

Filed under: Uncategorized Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.

Twitter

Recent

Pages

Categories

Archives

Flickr

669 Bergen St, Brooklyn, NY 11238, USA669 Bergen St, Brooklyn, NY 11238, USA669 Bergen St, Brooklyn, NY 11238, USA669 Bergen St, Brooklyn, NY 11238, USADouble cheese burgerDouble Rainbow