homepage Welcome to WebmasterWorld Guest from 54.198.130.203
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Align flash
johniem




msg:3925625
 1:29 pm on Jun 3, 2009 (gmt 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>
<div id="sideAdvs">
<?php include 'sideAdv.php';?>
</div>
</div>

css code:
#slideShow{
position: absolute;
left:0px;
float: left;
width: 600px;
height: 400px;
z-index: -1;
}

#sideAdvs{
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.

sledeShow.php

<div>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/
cabs/flash/swflash.cab#version=6,0,40,0"
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"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
<div>

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>

 

simonuk




msg:3926440
 1:01 pm on Jun 4, 2009 (gmt 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.

johniem




msg:3926682
 6:37 pm on Jun 4, 2009 (gmt 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..

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved