.some-class { width: 50%; padding: 2em; border: 0.1rem; }
The total calculated width for .some-class would be: 50% + 2em + 0.1rem
It will actually be 50% + 4em + 0.2rem, because you use padding and border and not just padding-left (right) / border-left (right)
padding-left (right)
border-left (right)
Ahhhh, of course! 🤦🏻♂️
Consider it updated. Thanks 🙌
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It will actually be 50% + 4em + 0.2rem, because you use padding and border and not just
padding-left (right)
/border-left (right)
Ahhhh, of course! 🤦🏻♂️
Consider it updated. Thanks 🙌