Forum Moderators: not2easy
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&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&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://localhost/openx/www/delivery/avw.php?zoneid=2&cb=INSERT_RANDOM_NUMBER_HERE&n=a1629698' border='0' alt='' /></a></iframe>
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.