CSS max-width Property

CSS max-width Property

CSS max-width Property is used to provide the maximum width. If the content is larger than the maximum width, then the element's height will be changed.

Example

Note: Understand the CSS width & max-width property.Please keep in mind that max-width does not create a horizontal scroll bar when the browser window size is smaller than the defined max-width while width creates a horizontal scroll bar when the browser window size is smaller than the defined width.

Online Test / Quiz