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
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";     
     }     
}     

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.