Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Align flash

1:29 pm on Jun 3, 2009 (gmt 0)

New User

10+ Year Member

joined:May 28, 2009
posts: 6
votes: 0

I have two flash objects in a div container dag and each one in a different div.These flash objects are suppose to appear next to each other but i can't achieve that. Can anyone give some advice how can I do this..?

html code:
<div id="width">
<div id="slideShow">
<?php include 'slideShow.php';?>
<div id="sideAdvs">
<?php include 'sideAdv.php';?>

css code:
position: absolute;
float: left;
width: 600px;
height: 400px;
z-index: -1;

position: absolute;
right: 0;
float: right;
width: 300px;
height: 250px;
z-index: -1;

I include with php the pages in my main.php page and i have try to put the code in my main.php page too,without includes but its the same result.


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
width="600" height="400" id="mymoviename">
<param name="movie" value="flash/xml_pg_final.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="wmode" value="transparent" />
<param name="menu" value="false">
<embed src="flash/xml_pg_final.swf" quality="high" bgcolor="transparent"
width="600" height="400"
name="slideshow" wmode="transparent" menu="false" type="application/x-shockwave-flash"

sideAdv.php //I'm using openx form this advertisment..

<iframe id='ab210373' name='ab210373' src='http://localhost/openx/www/delivery/afr.php?zoneid=2&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='300' height='250'><a href='http://localhost/openx/www/delivery/ck.php?n=a1629698&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://localhost/openx/www/delivery/avw.php?zoneid=2&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a1629698' border='0' alt='' /></a></iframe>

1:01 pm on June 4, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 9, 2003
votes: 0

There appears to be quite a bit wrong with your code.

When you absolute position what you're saying is "hey I don't want you to go with the flow, I want you to break out of everything and do your own thing!".

You're telling #slideShow to ignore everything on the page and are forcing it to the left. Likewise #sideAdvs.

To have these side by side you need to create the CSS in way that, although embedded, will follow the flow of their parents.

By removing the absolute positions, the left;0, right:0, and z-index and instead using floats to control their positions you can get them side by side.

Note that the widths you've set means that for the majority of the people viewing your page they will never be side by side because you are designing this only for people with very big monitors or resolutions. Probably around 3 to 10% will see it as you want and it will be broken for all others.

6:37 pm on June 4, 2009 (gmt 0)

New User

10+ Year Member

joined:May 28, 2009
posts: 6
votes: 0

Thanks a lot for your reply mate. I have give more space to the right div assigning margin-right atribute to my left div, and then float the right div to the right and everything works fine...As for the width of my page i have assign a container div for the elements of my page with max-witdh 1024px and no replacement of my contents on window resize..i'm changing the resolution of my desktop to 1024x768 everytime i want to check the alligment of my page...But do you think that i will have problems?I don't know much for web designing...i just stuck with this project and i have to complete it..

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members