[WSG] obj height: css + js

2007-06-04 Thread MarcLuzietti
I need to get the height of a window minus five ems expressed in pixels, 
so that I can slide a layer up and down. How do I capture this data?

-- 
Marc Luzietti
Flagship Project
Bayview Financial, L.P.
(305) 341-5624


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] obj height: css + js

2007-06-04 Thread michael.brockington
Marc,
It is pretty trivial to use JavaScript to 'measure' the height of a
window / viewport - you should be able to find plenty of articles that
describe the details, if you Google carefully. From what I remember, all
browsers will give you this data in pixels, regardless of how the
element you are measuring is defined.

I presume that the 'five ems' bit is to compensate for the height of
the element you want to move? If so, you need to also measure the height
of that element directly. If not, you probably need to fake such an
element, as I don't think the browser will have any way of telling you
big an  em  is at any one point on screen, and after all it will vary
depending on where you are.

Mike

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 [EMAIL PROTECTED]
 Sent: Monday, June 04, 2007 4:25 PM
 To: wsg@webstandardsgroup.org
 Subject: [WSG] obj height: css + js
 
 I need to get the height of a window minus five ems expressed 
 in pixels, 
 so that I can slide a layer up and down. How do I capture this data?
 
 -- 
 Marc Luzietti
 Flagship Project
 Bayview Financial, L.P.
 (305) 341-5624
 
 
 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***
 
 


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***