I 've been asked this question a few times in the last couple of months, so I thought I wocould put together an Example page to show how you can get Flash content to stretch to 100 percent height and width without using tables.
It's actually pretty simple. Here's some of the css I used:
Code
/* Hide from ie5 Mac \ */
Html {
Height : 100% ;
Overflow : Hidden ;
}
# Flashcontent {
Height : 100% ;
}
/* End hide */
Body {
Height : 100% ;
Margin : 0 ;
Padding : 0 ;
Background-color : # Eee ;
}
SettingHtml
Tag to 100% height and then placing the Flash Movie insideDiv
That is also set to 100% height does the trick.
NoticeOverflow: hidden
OnHtml
Element since IE will show the scrollbar even if the page doesn't need to scroll. this line will force IE to hide any content that is outside of the browser window, and therefore hide the scrollbar as well.
To embed the Flash Movie, I used my flashobject JavaScript embed so the page will validate and I have access to all the varous flash parameters I might need to pass to the Flash Movie.
Update (01-05-2005 ):Someone pointed out a bug with this in IE 5 on Macintosh, so I 've updated the CSS a bit to make it work. current verified working browsers are: IE 6 (PC), ie 5 (MAC), Safari, Firefox (PC, Mac), Mozilla (PC, Mac), opera 7.54 (MAC ).
If you have other browsers available for testing I wocould love to know if this displays properly or not. I'm mainly interested in IE 5 and 5.5 on a PC.
Update (1-17-05 ):Tested in IE 5.01 SP2 and IE 5.5 SP2 on a PC today, and it works great.