Skip to main content
CSS Code Completion Hard +35 XP

Calc Function

Complete to make an element fill remaining width.

CSSFill in the blank
.sidebar { width: 250px; }
.main { width: ___(100% - 250px); }

Type the missing code

Show answer and explanation

Answer: calc

calc() performs math in CSS, mixing units. calc(100% - 250px) fills all remaining space after the sidebar.

Hint: Which CSS function performs arithmetic?

What this challenge tests

Code Completion in CSS: calc, layout.

Related challenges