Use SWF As A Div Background with CSS

Have you ever wanted to use Flash as a background image in your web design;so that you can do all sorts of neat things? For instance, having Flash in the background of a DIV with a DIV placed over it will allow you to use real HTML and database pulled dynamic content; and you get the best of both worlds that way. Well; that may be so, but is definately not the easiest trick to pull off either. There are actually a couple things ways it can be done; but I will discuss the way that I see as the most "technically correct" way. The essential idea to get this working, is that you need a DIV cell that wraps around the area you want to set the background and foreground in. The DIV is set at a fixed width and height. Then, inside that div you nest a second div, which is positioned relative and set at the same exact width and height too. Inside of that DIV; you insert your Flash movie; and I would suggest it also be loaded in at the exact same width and height. Then after that DIV's closing bracket, you want to immediately insert another DIV cell; and this one ALSO has the same width and height; but it is positioned absolute instead of relative. And then you should probably insert a set width and height table right inside of that DIV cell. Now there are still a couple tricks left; you must set your Flash movie to wmode=transparent. You must also set the Z-index for both DIVs, so that the Flash content can be layered correctly. To do this; on the background DIV that is positioned relative, set the a z-index of 1. Then on the absolutely positioned DIV; set a z-index of 1000. Now you should be free to work inside of that table cell at your leisure. Go ahead and insert another DIV if you want to. Whatever you want to do; its now up to you.





Luxe Design NYC & DC on MySpace.comLuxe Design NYC & DC on TwitterLuxe Design NYC & DC on LinkedInLuxe Design NYC & DC on Facebook PagesLuxe Design NYC & DC News/Updates