CSS calc() Function

The CSS calc() function allows us to perform mathematical calculations when defining CSS values.

Using calc() for Layout

The width of this box is calculated using the CSS calc() function.

Card 1

Width: calc(50% - 10px)

Card 2

Width: calc(50% - 10px)

Back to Home