Question: what is the difference between .width() and .outerwidth()?
Answer: The width() method excludes padding, margin or border of the element. Whereas, the outerWidth() method (which too measures the element horizontally), includes padding, borders and (optionally) margins. The best way to understand the difference is using examples.