jQuery how to get innerWidth but without the padding?

Solution 1:

You're probably just looking for the width() function..

See the docs, it excludes the padding: http://api.jquery.com/width/

(Just as intended in modern browser's representation of the css width property)

Edit: It's now 2012 and jQuery 1.8 is just coming out. While this is still relevant, you may also want to read the following article from the jQuery blog regarding box-sizing considerations in version 1.8

Solution 2:

$('#element').width();

It's as simple as that!