Learn how to perform math in CSS using the calc() function.
The calc
function
The calc()
function lets us perform simple calculations in CSS. We can work with addition (+
), subtraction (-
), multiplication (*
), and division (/
) operators. The most useful feature of this function is the ability to mix units. For example, we could use it to subtract pixels from the ...