RE: window size

by "tim booker" <timbooker(at)btinternet.com>

 Date:  Tue, 24 Jul 2001 23:58:44 +0100
 To:  "'Nate Harel'" <nharel(at)consultant.com>,
<hwg-techniques(at)hwg.org>
 In-Reply-To:  rcn
  todo: View Thread, Original
Using JavaScript:

function getDocSize(n)
 {
 	if (window.innerWidth)
 	 return eval('window.inner' + n);
	else if (document.body.clientWidth)
 	 return eval('document.body.client' + n);
 }

w = getDocSize('Width');
h = getDocSize('Height');


You might be better just setting some CSS:

position: absolute;
left: 80%;


I'd be more help if I could see the page you're trying to fix.

Tim





www.ApatheticGenius.com

 

> -----Original Message-----
> From: owner-hwg-techniques(at)hwg.org
> [mailto:owner-hwg-techniques(at)hwg.org]On Behalf Of Nate Harel
> Sent: 24 July 2001 21:15
> To: hwg-techniques(at)hwg.org
> Subject: window size
> 
> 
> Hi all,
> 
> I need to move an object a certain distance depending on the 
> size of the 
> open window.
> 
> In other words, I have a layer that has some text in it. When 
> the window is 
> resized, I want to be able to determine what that size is and 
> move the 
> layer some distance so that it does not go over other text.
> 
> Is this possible, is there a way to determine that size of 
> the open window 
> using Javascript or any other mechanism?
> 
> Thanks
> 
> Nate
> 
> 		---------------------------------------------------
> 			 Nate Harel
> 		        NetTech Services
> 		        66 Carol Road
> 		  Needham, MA  02492-1108
> 		    Tel: 1-781-559-8176
> 		 Toll Free: 1-877-567-8936
> 		   FAX: 1-877-567-8936
> 		 Email: nharel(at)consultant.com
> 		     www.nettech-services.net
> 		----------------------------------------------------

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA