I want to get the width of an element including border, margin and padding.
I know using $(input).width() or $(input).css('width') give the width of the element.
But here is the requirement.
Suppose I created a text box like follows:
<input type='text' id='txtBox' name='txtBox' style='width:100%' />
or
<input type='text' id='txtBox' name='txtBox' style='width:auto' />
If I get the width using either $input.css('width') or $input.width(). I am not able to get the width in pixels. I am using jquery1.3.2.