...

View Full Version : Positioning Flash Content



CSSisthebest
07-15-2007, 04:31 PM
Problem Is Now Fixed.

i have recently started recoding my site in css, so far i have managed to:
background color - that was easy lol
position my header image horizontally in the center so when you change the size of the browser window it moves with it. one problem with this is making it so that its a certain percentage from the top of the screen.
position my navigation bar image in the same way. this is fine
i now need to include flash content, from reading up on this i understand that you cannot embed content in css so this would rule out css to do this, however is there any other way of horizontally aligning my flash content with my other images ?thanking you in advance

James :cool:

Problem Is Now Fixed.

VIPStephan
07-15-2007, 05:13 PM
You cannot embed Flash content with CSS, thatís true. You include it with the HTML object element. However, CSS is for styling HTML, so what you would do is style the object element. There are limited possibilities but you can define width, height, margins, and position, among others.

CSSisthebest
07-15-2007, 05:31 PM
would this be how i would do it ?


<head>
<style type="text/css">
object {
display: block;
margin-left: auto;
margin-right: auto;
margin-top:0%
}
</style>
</head>
<body>
<object class="normal" src=technolanebanner.swf width="800" height="66" title= "technolane flash banner" />
</body>

CSSisthebest
07-15-2007, 06:32 PM
does anyone know if the above code i have written would work ?

thanks

james

VIPStephan
07-15-2007, 08:28 PM
Why donít you test it and see whether or not itís working? Technically nothing is wrong (except object requiring a closing tag) but I would need to test it as well to be totally sure.

Always research for yourself before you ask and only ask if there are actual problems.

CSSisthebest
07-15-2007, 09:02 PM
i solved the problem by doing the following:


<style type= "text/css">

/* Flash Banner */
#flash {
display:block;
margin-left:auto;
margin-right:auto;
width:800px;
background:url(technolanebanner.swf);

}

</style>
</head>
<body>
<div id="flash"><embed src="technolanebanner.swf" wmode="transparent" width="800" height="180" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" title="flash banner"></embed>
</body>

this made the content inside the div tag move to auto center with the browser.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum