loading...

re: Things I Wish I’d Known About CSS VIEW POST

FULL DISCUSSION
 
.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)

 

Ahhhh, of course! 🤦🏻‍♂️

Consider it updated. Thanks 🙌

Code of Conduct Report abuse