If the element is a block element simply remove the width and that width will then be auto and expand to fill the available space automatically including any padding and borders.
If you are talking about widths other than 100% then use the border-box model and all padding and borders will be included inside the specified width.
One also has to CONSIDER WHEN to add ‘WIDTH:100%’.
If you are dealing with a block element, or at least one with display:block; assuming it’s not floated, AP’ed, etc ) it automatically has width:100%; So the best solution in that case is to set ONLY the padding and not the width; I believe, Paul mentioned this.
CLARIFICATION: by default, a block element has width:auto; which means it will take that it’s CALCULATED width will be 100% of its parent element(and it does not include the parent’s padding)-the padding of the element itself. for all appearances…it looks as if the element+ its padding=100%;
Tables ( or display:table;) will also automatically included the padding in the calculated width.
So that leaves , mainly, floats and inline-blocks. For those, you could use -box-sizing, or move the padding out to the container.