max-width CSS Property
max-width property is use when we want to set the maximum width for a html element. Remember this width dose not include the padding, margin, and borders of the element.
Definition Of max-width property:
The max-width is a property of CSS let you to specify the maximum width for html elements.
What max-width property can do?
This max-width property allow us to define the maximum width for a particular element. This property is recognized by all major browsers, but IE not support inherit property value.
How to use CSS max-width property?
Syntax:
1
max-width: length | percentage | non
Example:
1
max-width:500px;
How to use CSS max-width property in Javascript?
You can set value of max-width property with Javascript in following manner:
1
object.style.maxWidth="300px"
Related posts
- fit
- voice-rate
- presentation-level
- margin-left
- empty-cells
- widows
- border-top-width
- border-spacing
- padding-top
- font-family
Tags: css max width, max-width, max-width property

1 Response
May 7, 2011
hi
i still don’t get how to use this. here’s my goal: i have a table with 2 columns. i don’t want to set an explicit width on either– rather i want the width of column 1 to be determined by it’s contents, and the width of column 2 to use all the remaining width available. how do i do that?
thanks!
Post your response