The calc() Function in CSS

Learn to calculate the height and width of the layouts using the calc() function.

Introduction

The CSS calc() function is most commonly used to calculate 100% of width and/or height, minus some specific width/height.

That’s exactly how we have used it in the example of the previous lesson’s CSS code, on line 19:

Get hands-on with 1400+ tech skills courses.