tags:

views:

167

answers:

2

Question:

I want to put 100% height and 100% width Flash in an html page. I've done it. Now I want to put in that page also HTML Footer which would stick to the bottom of the page.

Tried: Numerous solutions. Googling. Asking friends. Failed

Thanks!

A: 

You need to add a position absolute or fixed element to the page. If you could post what you have tried (not a list of things you have tried, but the actual code you have tried), then maybe someone can help you.

You probably have to use some JavaScript to get this to work. Add a listener waiting for a resize event, and when a resize occurs, resize the div containing the flash. You will need to set it's height to be the height of the window minus the height of the footer.

Marius
I have thought about java script implementation, but I am just hoping that there is quick and stable CSS solution, and I am sure there is, but nobody can find it
Andrey
A: 

you need:

Footer { position: absolute; bottom: 0; left: 0; right: 0; height: somepx; }

then on your main container element, having a margin-bottom of -somepx; will prevent it overlapping with the footer. alternatively, just don't use that bit of the flash canvas and leave it at 100% height.

you may need to specify the same z-index, eg. z-index: 100; on both elements, to ensure they don't overlap each other, if using the first solution.

Identity
it didn't really work for me :(
Andrey
what didn't work about it? it seems that you're making the mistake of thinking your flash should be 100%x100%, when it should be in a absolutely positioned element that is left: 0; right: 0; top: 0; bottom: somepx;
Identity
The problem with setting top, left, right=0 and bottom=20px is that the flash movie won't scale to 100%, because the containing clip doesn't have a width from which it can calculate the percentage.
Marius
true, but it should be possible to specify width alongside the above settings. I wasn't trying to do the OP's job! ;)Andrey, you may want to look at http://swffit.millermedeiros.com/ to fit the flash to the screen when resized.
Identity