css 3

Icon

A comprehensive CSS 3 reference guide, tutorial, and blog
Are you a CSS expert? Want to contribute? Contact us

CSS MAX-WIDTH

This property allows a maximum width to be set for an element box. The calculation for the element’s width may be less than this value, but if the calculated ‘width’ value is above this value it will recompute the ‘width’ using the ‘max-width’ value as the new ‘width’ value. If the value of ‘min-width’ is greater than the value of ‘max-width’, the ‘max-width’ property value becomes the ‘min-width’ value.

 

Example

h5 { max-width: 150px }

<h5 style=”max-width: 150px”>content</h5>

 

Possible Values

Value Description
inherit Explicitly sets the value of this property to that of the parent.
none No limit is placed on the maximum allowable width for the element.
[length] Refers to an absolute measurement for the maximum computed element box width. Negative values are not allowed.
[percentage] Refers to a percentage of the width of the containing element block.

 

 

Leave a Reply

Pages

Sponsors

$100 PSD to XHTML. CONTACT US FOR MORE INFORMATION


CSS3.com



Please help CSS3.com stay alive and running

Bad Behavior has blocked 974 access attempts in the last 7 days.