It’s possible to get the element outerWidth using the dom?
Ej:
var width = document.getElementById('myDiv').outerWidth;
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.
No, but you can get offsetWidth, which is probably what you want.
From http://www.quirksmode.org/dom/w3c_cssom.html
offsetWidth and offsetHeight
clientWidth and clientHeight
See this fiddle for an example.
If you use jQuery you have more options: width, innerWidth and outerWidth properties.
http://api.jquery.com/category/manipulation/style-properties/