tailieunhanh - HTML Utopia: Designing Without Tables Using CSS- P15

HTML Utopia: Designing Without Tables Using CSS- P15: I’ve been around the Web for a while now some might say I’ve been here from the beginning. And one thing that always bothered me about the Web was its inherent inability to disentangle content from presentation. | max-height min-height max-height min-height Instead of setting a fixed height it is sometimes useful to set limits on the height of an element. These two properties let you set a maximum and or minimum height. The height of the element is calculated normally and then these limits are applied. Remember to set the overflow property to hidden or another appropriate value if you set a max-height otherwise the content will overflow the specified height even if the element does not. Inherited No See also height max-width min-width Value The property takes a CSS length px pt em etc. a percentage of the parent element s content area height or in the case of max-height only none. Initial value max-height none min-height 0 Compatibility CSS Version 2 This property is fully supported on Safari Opera and Mozilla browsers only. Internet Explorer 6 and later supports min-height only and then only on td th and tr elements in fixed-layout tables see table-layout . The CSS 2 specification states that this property should not apply to table elements this is corrected when IE renders in standards-compliant mode32 . 32 http librarv cn-us dnic60 html 399 Licensed to siowchen@ Appendix C CSS Property Reference Example This style rule specifies that the element with ID sidemenu should have a height between 200 and 1000 pixels and should display a scroll bar if the content s height is greater than the maximum sidemenu min-height 200px max-height 1000px overflow auto max-width min-width Instead of setting a fixed width it is sometimes useful to set limits on the width of an element. These two properties let you set a maximum and or minimum width. The width of the element is calculated normally and then these limits are applied. Remember to set the overflow property to hidden or another appropriate value if you set a max-width otherwise the content will overflow the specified width even if the element does not. Inherited No See also width .