100% height only works if the parent element's height has also been set.
most of the time this will do the trick:
html { height: 100%; }
body{ height: 100%; }
#myDiv { height: 100%; }
otherwise you may need a scripted solution.
On Tue, Feb 24, 2009 at 11:55 AM, bunner bob <[email protected]> wrote:
>
> I'm embedding an SWF in an HTML page with a center "content" section
> whose width can vary between 600 and 800 pixels (based on browser
> window width, using min-width and max-width, and an expression for
> IE6).
>
> The SWF is a horizontal rectangular shape. As the browser changes
> width, the SWF scales to fit the width. Correspondingly, the SWF's
> height changes.
>
> I'm embedding it like this:
>
> <script type="text/javascript">
> var flashvars = false;
>
> var params = {};
>
> var attributes = {};
>
> swfobject.embedSWF("swf/nav.swf", "navContainer", "100%", "100%",
> "9.0.0", "swf/expressInstall.swf", flashvars, params, attributes);
> </script>
>
> The SWF scales with no problems. However, the div ("navContainer")
> doesn't change height to accommodate the SWF.
>
> My HTML uses the Transitional doctype. In my CSS, if I don't specify
> the height of navContainer, I can't see my SWF at all. Likewise if I
> set height to auto. I can set a fixed pixel height but then the div
> doesn't resize.
>
> If I get rid of the doctype, the div expands to push the page to the
> available height of the window (viewport minus content header and
> content footer).
>
> What I want is for the div to only be the height of the contained SWF.
> As the window is made wider or narrower, and the SWF scales, the div
> should get taller or shorter, so the content below the SWF stays in
> the same relative position to the bottom of the SWF.
>
> Normally in CSS a div is only the height of whatever it contains. So
> I'm having trouble understanding why my div is either a) apparently
> height zero, or b) (if I get rid of the doctype) 100%.
>
> Thanks for any help!
>
> - Bob
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---