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.
- **values: It is the set of comma-separated values from which the smallest one is extracted.
**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 usedGeeks for geeks
`
**Output:
**Example 2:
html `
Document When nested min function is used with different unitsGeeks for geeks
`
**Output:
**Browsers supported:
- Chrome 79 and above
- Opera 66 and above
- Internet Explorer not supported
- Safari 11.1 and above
- Firefox 75 and above
- Edge 79 and above