Anyone explain the calc() function?

Width : calc(30% - 5px) what is the meaning of this function??
2 Replies
Jochem
Jochem14mo ago
it will do that math. The width of the element will be 5 pixels less than what it would be if it was just set to 30%
MarkBoots
MarkBoots14mo ago
advise, always make sure there are spaces surrounding the operators. otherwise it will break (happens to me too many times) width: calc(30%-5px) will not work
Want results from more Discord servers?
Add your server