With box-sizing: border-box, the total width stays 300px even with padding.