Anyone explain the calc() function?
Width : calc(30% - 5px) what is the meaning of this function??
2 Replies
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%
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