CSS max-width property

CSS max-width

CSS max-width property is used to set the elements maximum width.

It is used to prevent the width value getting bigger than the specified value, but min-width may overrides the max-width.

Example

Try Yourself