I'm trying to get my embed code to center the flash stage in the center of the browser with no space at the top of the browser. The code I have below just keeps it left aligned. Can anyone tell me why the style is not working.
Will remove space at top and center content. Of course you'll need to add any other style to body or main_container that you need and set width/height as needed.
Best wishes,
Eye for Video www.cidigitalmedia.com
Thanks for your reply but I'm not seeing how that would work with my code.
Is main_container the same as what I have as my ID name "flashcontent" or is this a completely separate div tag? It would be great if you could explain how I could use this in conjunction with my code.
You could rename main_container to flashcontent or use main_container as a wrapper container if you have a number of other <div>s on the same page.
Various browser have different default padding and margins so it's a good idea to zero those things out from the very beginning to handle those cross browsers differences.
Best wishes,
EfV
This is exactly what I had posted just above your previous post. IF you try adding my SWFObject it still stays to the left of the page and does not center horizontally when scaling the browser.
Did you put a background color like #00ff00 in the "flash content"? Be sure that sticks out like a sore thumb for testing. Does that div show up as centered?
When you add the Flash, is it inside or outside that green rectangle (flash content)?
EfV
Thanks Eye for Video that's great but the idea here is to be able to put content into the div like flash and if flash is not installed then alternative html content.
I understand that your div tag will center but when the flash object is placed in there it does not. Maybe someone can let me know why this is happening.
Yeah sorry I couldn't be more help, but I do understand the idea of inserting Flash and alt content into the <div>. The principle being that the CSS has to work before you attempt to insert the Flash.
I use swfobject and alt html content all the time. Here's just a couple examples of using swfobject and alt content, including a complete text narration to match the Flash video content. That particular alt content was indexed within 4 hours of uploading the page. OH YEAH, I love swfobject! View source to review code, scroll down to
The problem is with how the newer versions of swfObject work. For a little bit of background, v1.x inserted the actual Flash content INSIDE the element you specified, and the newer 2.x code REPLACES the element.
So the issue is that you're styling the element that is being REPLACED. You need to nest it inside another <div> to actually have it styled properly.
That extra <div> is just needed to tell swfObject to replace THAT inner object instead of the one you're actually styling. This is technically a feature in 2.x and gives you a bit more flexibility in how your place your Flash objects on the page.