If I use the box-sizing property to border-box, does it make resetting margin and padding to 0 irrelevant or is it still something I should do?
i.e.
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
If I use the box-sizing property to border-box, does it make resetting margin and padding to 0 irrelevant or is it still something I should do?
i.e.
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
It is still relevant as the box-model just change the way your margin/padding/border being calculated in width and height.
When you set box-sizing: border-box; on an element, the padding and border of that element no longer increase its width.
cheack this out :- http://learnlayout.com/box-sizing.html