Skip to main content

MaxWidth

Typeobject
Backlinks1

This property is used to set the maximum width of an element and is only available when the size type is fixed or relative. By setting the max-width property of an element, you can specify the maximum width of the element in the horizontal direction, so that it will not exceed this width. This is useful for ensuring that elements do not stretch excessively when displayed on different devices.

PropertyTypeRequired
classstringRequired
valueLengthRequired

class​

Required

Type

string

Value

constant: the value of this property must be equal to:

"maxWidth"

value​

Required

Description

Available types include only fixed and relative.

Type

Length