CSS min() Function (original) (raw)

Last Updated : 30 Aug, 2024

**min() function in CSS is used to extract the minimum value from a set of comma-separated values. It can take two parameters and a min function can be used inside another min function if the comparison is to be made between multiple values.

**Syntax:

min(value1, value2);
min(value1, min(value2, min(value3, value4)));

**Parameters: It takes the following parameters.

**Returns: This function returns the smallest value from a set of comma-separated values.

Below given are a few examples of the above function.

**Example 1:

html `

Document

When nested min function is not used

Geeks for geeks

`

**Output:

**Example 2:

html `

Document

When nested min function is used with different units

Geeks for geeks

`

**Output:

**Browsers supported: