Attribute |
Description |
Remarks |
Height |
Retrieve or set the object height |
Actual object Height = margin + border + padding + height |
Max-height |
Retrieves or sets the maximum height of an object. If the value of this attribute is smaller than the value of the Min-height attribute, it is automatically converted to the value of the Min-height attribute. |
|
Min-height |
Sets or retrieves the minimum height of an object. If the value of this attribute is greater than the value of the Max-height attribute, it is automatically converted to the value of the Max-height attribute. |
|
Width |
Retrieve or set the width of an object |
Actual object width = margin + border + padding + width |
Max-Width |
Sets or retrieves the maximum width of an object. If the value of this attribute is smaller than the value of the Min-width attribute, it is automatically converted to the value of the Min-width attribute. |
|
Min-Width |
Sets or retrieves the minimum width of an object. If the value of this attribute is greater than the value of the Max-width attribute, it is automatically converted to the value of the Max-width attribute. |
|
Example:
<! Doctype HTML public" -// W3C // dtd xhtml 1.0 transitional // en "" Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <HTML xmlns =" Http://www.w3.org/1999/xhtml "> <Head> <title> No title page </title> <style type =" Text/CSS "> Div, span {border: solid 1px black;} Div {max-width: 400px; Min-Height: 300px;} span {Height: 50px; max-width: 300px; Float : Left ;} </style>
Effect: