How to find out a layer's height with Javascript?

A

a-ok

I need to find a layer's height with Javascript. Also, the bottom
coordinate of the layer would be nice.

Of course it has to work in MSIE, FF, Opera, NN6+ etc. If there are
different ways for every browser it's no problem, but I can't find the
height property in any of them.



rgds.
 
R

RobB

I need to find a layer's height with Javascript. Also, the bottom
coordinate of the layer would be nice.

Of course it has to work in MSIE, FF, Opera, NN6+ etc. If there are
different ways for every browser it's no problem, but I can't find the
height property in any of them.



rgds.

Probably best to avoid that word, 'layer'. 'element' removes any
ambiguity as to what you're referring to. ;)

Element height:

http://www.faqts.com/knowledge_base/view.phtml/aid/7023/fid/255

Element coordinates:

http://www.quirksmode.org/js/findpos.html

offset*** properties - these are not CSS, althought they may be
affected by it - are the actual calculated values used by the browser
for layout, accurate, and read-only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top