IE6 supports compatible min-width, Max-width CSS style properties

Source: Internet
Author: User

IE6 supports compatible min-width, max-The width CSS style property lets IE6 support Max-width, IE6 support min-width style When we write CSS, we often encounter let a picture or a layout can not exceed set a certain width range value, sometimes need to set a minimum width, followed by DIVCSS5 for everyone to summarize the resolution IE6 not support min-width and does not support max-width of the method. The following is the CSS width IE6 support minimum width, maximum width resolution technique (you may need to learn more about CSS width knowledge). Catalog IE6 Support Max-Width Resolution IE6 support min-The width workaround IE6 that supports Max-width also supports min-width1, IE6 supports Max-width solutions-TOPIE6 supports maximum width, resolves CSS code:. Yangshi{max-width:1000px;_width:expression ((document.documentelement.clientwidth| | Document.body.clientWidth) < +?"1000px":""); Overflow:hidden;} Description: Max-width:1000px; This is IE6. The maximum range width is supported by other brand browsers. and _width:expression ((document.documentelement.clientwidth| | Document.body.clientWidth) < +?"1000px":""); overflow:hidden; let IE6 support max-width overrides CSS code, but the effect is the same as other versions of the browser. Let all browsers support Max-width CSS style code, complete: Max-width:1000px;_width:expression ((document.documentelement.clientwidth| | Document.body.clientWidth) < +?"1000px":""); Overflow:hidden; The 1000 and 1000px here are the values you need, note that the 3 values are the same. Set Max Max-don't forget to add overflow:hidden when you are at width;2, IE6 supports Min-width solutions-TOPIE6 Support minimum width, resolve CSS code:. Yangshi{min-width:1000px;_width:expression ((document.documentelement.clientwidth| | Document.body.clientWidth) > +?"1000px":"");} Description: Min-width:1000px; This is IE6. The maximum range width is supported by other brand browsers. and _width:expression ((document.documentelement.clientwidth| | Document.body.clientWidth) > +?"1000px":""); Let IE6 support min-width overrides CSS code, but the effect is the same as other versions of the browser. Allow all browsers to support min-width CSS style code, full: Min-width:1000px;_width:expression ((document.documentelement.clientwidth| | Document.body.clientWidth) > +?"1000px":""here, 1000 and 1000px are the values you need, note that the 3 values are the same. 3, let IE6 support Min-width at the same time support max-width solution-Top let IE6 support the minimum width and support the maximum width limit setting. In this case we often touch on the picture control, so that the size of the picture, if too wide, can not exceed a certain range of values, small time does not control his method, with the CSS code: _width:expression ( This. scrollwidth >620?"620px": ( This. scrollwidth <1?"1px":"Auto") ; CSS full code for picture control: Img{max-width:620px;_width:expression ( This. scrollwidth >620?"620px": ( This. scrollwidth <1?"1px":"Auto"));} Description: The picture cannot exceed the width of more than 620px, and not less than the width of 1 pixels. Let all browsers include IE6 browser support maximum width and support minimum width div CSS code:. Yangshi{max-width:620px;min-width:1px;_width:expression ( This. scrollwidth >620?"620px": ( This. scrollwidth <1?"1px":"Auto"));} 

IE6 supports compatible min-width, Max-width CSS style properties

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.