Jump to content

count width of left and right banner


ebchost

Recommended Posts

i think that z-index is not solution

if you  look

http://www.radio-la.info

 

if z-index is 1 or more, banner go over web page (bouth), if z-index is 0 or lower, i cann not click on banner, i see only picture from left and right side of web page, available for a click

 

now, is logical to have z-index on bouth div (banner) value 1 or mor

 

but, how to count widhth of the banner, (now width of banner is 25% the left is z-index:0; right is z-index:1;)

 

width = free white space from left or right side of web page

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/256766-count-width-of-left-and-right-banner/
Share on other sites

this is solution, but is not exelent

 

if you see my web page after open it, you will see url like

 

http://radio-la.info/?r=1&width=1366&Height=768 (if resolution is 1366 x 768)

http://radio-la.info/?r=1&width=1440&Height=900 (if resolution is 1440 * 900)

 

how to do this, without url ? how to transfer valu from java script to php ? thanks

 

this is code

 

 

<?     
if(!isset($_GET['r']))     
{     
echo "<script language=\"JavaScript\">     
<!--      
document.location=\"$PHP_SELF?r=1&width=\"+screen.width+\"&Height=\"+screen.height;     
//-->     
</script>";     
}     
else {         

// Code to be displayed if resolutoin is detected     
     if(isset($_GET['width']) && isset($_GET['Height'])) {     
               // Resolution  detected
                  $sir = $_GET['width'];
                  $vis = $_GET['Height'];
                  //echo "width $sir";
                  $slo = $sir - 986;
                  //echo "<br>";
                  //echo "free pix width $slo"; 
                  //echo "<br>";
                  $ban = $slo/2;
                  //echo "banner width = $ban";
     }     
     else {     
              // Resolution not detected 
              //echo "nema";     
     }     
}     

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.