- - Code, Content, and Presentation
- -- CSS
- ---- Padding adding extra width. content not staying inside.
DrDoc - 6:16 pm on Jul 20, 2013 (gmt 0)
That is standard. An element's "space" is exactly equal to its border + padding + width.
CSS Box Model [w3.org]
|Each box has a content area (e.g., text, an image, etc.) and optional surrounding padding, border, and margin areas. |
The width applies only to the content area itself.
Thread source: http://www.webmasterworld.com/css/4594845.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com