The Box
Hello my friends!
I know, I know you know the "border" and its features.
But, as we all know, the space it fills is out of the area, meaning if you have a square of "50px" and a border of "5px"(all sides), it will be "60px". This is not to mention "padding", because if you have a "padding" of "5px"(all sides) in the same example, then the content would be "70px". Did you understand the problem?
via GIPHY
Would Stay:
"50px" of "width" and "height" + "10px" of "padding" and + "10px" of "border", totaling "70px" content.
To use the border as part of the content already exists and add no more pixels, the "box-sizing" border-box is used.
Use:
box-sizing: border-box;
Results:
My name is box-sizing!












