PDA

View Full Version : [SOLVED] Flash Affecting my CSS


dmbox
3rd March 10, 02:18 PM
I am building a site that will have a full browser flash intro page...and it has been working fine, with CSS and XHTML validated.

Today I added a small flash component to automatically play background music and the SWF is no longer centered.

Any idea why the addition of this small component would change the layout?

Here is the correctly positioned SWF (no component)
=======================================
http://twocleverchicks.com/index_new.html

Here is the incorrectly positioned one (with component)
=======================================
http://twocleverchicks.com/index_new2.html

Here is the intro page CSS

<style type="text/css">

* {
margin:0;
padding:0;
}

html, body {
height:100%;
overflow:hidden;
}

body {
background-color:#333; /* page color */
text-align:center; /* horizontal centering for IE5 Win quirks */
}

#distance {
width:1px;
height:50%;
background-color:#333;
margin-bottom:-50%; /* half of container's height */
float:left;
}

#container {
margin:0 auto;
position:relative; /* puts container in front of distance */
text-align:left;
height:100%; /* Height of centered container */
width:100%; /* Width of centered container */
clear:left;
background-color:#333; /* Color of centered container */
border:1px solid #333;
border-top-color:#333;
border-left-color:#333;
}

</style>

Thanks for your help.
dmb

meesa
3rd March 10, 03:30 PM
Well, considering that you have a lot more <param />'s in your second page then in your first, most of which are unneeded, my guess is that if you remove all those extra elements, it'll be fixed.

dmbox
3rd March 10, 03:51 PM
Thanks for the quick response this morning.

Both pages appear to have the exact code, including the same number of <param's when I view the code in Dreamweaver. The only difference being the name of the SWF.

So I thought perhaps the added component may be adding <param's from the server side, but when I view source using FF web toolbar....again the coding appears to be the same.

Where are you seeing the extra <param's ?

meesa
3rd March 10, 04:06 PM
Ahh, IE adds in some elemens if you hit the edit button.

Here's what I wou'd try: Take your first page and just copy it, then just change out which movie it's playing. If you are still having a problem, then the Flash is to blame.

dmbox
3rd March 10, 05:18 PM
Thanks Meesa.....must be the flash.

http://twocleverchicks.com/index_new3.html

I have submitted a request to the component's forum....and am working on a possible fix.

Going to try to create the same effect using a 800x600 main SWF and a tiny SWF of the audio player.....all contained in XHTML layout.

Wish me luck....
dmb