I know that we can have the absolute position of a div even if we don’t set it (by using offset) : http://www.quirksmode.org/js/findpos.html
Can we get the width (or height) of a div even if we don’t specify it ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use clientWidth and offsetWidth to get the width.
clientWidth returns the viewable width of an element but does not include borders, margins, or scrollbars. offsetWidth returns the width of an element (including borders and padding), but not margins.