fabriciocs / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

100% width / height bug in firefox #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. change the dynamic example (from the zip) to:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>SWFObject v2.0 dynamic embed sample page</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
        swfobject.embedSWF("test.swf", "myContent", "100%", "100%", "9.0.0",
"expressInstall.swf");
        </script>
    </head>

    <body>
        <div id="myContent">
            <h1>Alternative content</h1>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img
src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player" /></a></p>
        </div>
    </body>
</html>

NB the only thing changed is the width/height in 100%

2. open in firefox (2.0.0.13 / 3.0.0.b4)
3. page stays empty

** What is the expected output? What do you see instead?
I would like to see the flash all over the page, but the page stays empty
The alternative content is replaced though... (with white screen)

** What version of the product are you using? On what operating system?
latest version 2.0 / mac osx 10.4.11

Please provide any additional information below.
on safari it works like expected

cheers 
Arnoud Bos

Original issue reported on code.google.com by arno...@gmail.com on 5 Apr 2008 at 8:20

GoogleCodeExporter commented 9 years ago
ok fixed it....

the html and body tag must have a height of 100% as well. 

just add the next lines to your stylesheet:

html {height: 100%}
body {height: 100%}

Otherwise it wont work on strict browsers like firefox. Summarised if a child 
dom
element wants to use 100% height than each of the parents up the dom tree must 
also
have a height of 100% (in this case we have html>body>myContent)

Hope that helps someone else ...

Arnoud Bos

Original comment by arno...@gmail.com on 5 Apr 2008 at 8:43

GoogleCodeExporter commented 9 years ago
It's also Q1 from our FAQ:
http://code.google.com/p/swfobject/wiki/SWFObject_2_0_faq_web_authors

Original comment by bobbyvandersluis on 6 Apr 2008 at 8:31