Prevent Padding change Element Width

ID - _SMBUGFISH - E#115
^Top
<< Back
Mobile-Menu










Prevent Padding change Element Width
Category: Programming
Sub-Category:
Creator: Bugfish
Created: 2020-12-21 19:55:51
Modified: 2025-09-18 21:16:50
Views: 655

Caution: I do not guarantee the reliability of the information given here, the code described on this page is executed at your own risk and in the event of damage or other unforeseeable consequences I am in no way responsible or liable.

Use this property on an element to make sure that any padding or borders applied to it are included in its defined width and height, preventing the element from unexpectedly growing larger than the size you set and ensuring a more predictable, consistent layout when designing pages.

-webkit-box-sizing: border-box; /* Chrome */
-moz-box-sizing: border-box;    /* Firefox */
box-sizing: border-box;         /* Opera/IE */
This Website is using Session Cookies for Site Functionality.