A simple method to be compatible with IE6's min-width and min-height

A simple method to be compatible with IE6's min-width and min-height

If a website is widescreen, you drag the browser window left and right and the website width will change with the size of the window. When the browser window width is reduced to a certain extent, a scroll bar will appear below and the website width will not be reduced any further. We know that this simple function can be easily achieved using CSS min-width, but unfortunately, many of our users' IE6 does not support this very convenient attribute. What can we do? We can solve this problem by adding the following CSS statement when designing the web page:

Method 1:

CSS CodeCopy content to clipboard
  1. height : auto ! important ;
  2. height : 580px ;
  3. min-height : 580px ;

Just add the above three lines of code to the div that requires a minimum width. The principle is to use the BUG of IE6 itself (when the content inside a block-level element exceeds the height of this block-level element, the height of the block-level element will be stretched, that is, the height attribute in IE6 itself is equivalent to min-height).

Method 2:

CSS CodeCopy content to clipboard
  1. min-height : 200px ;
  2. _height: 200px ;

Method 3:

CSS CodeCopy content to clipboard
  1. #min -width{
  2.      min-width : 900px ;
  3. _width:expression((document.documentElement.clientWidth||document.body.clientWidth)<900? "900px" : "" );
  4.      line-height : 200px ;
  5.      background : #ccc ;
  6. }

Method 4:

CSS CodeCopy content to clipboard
  1. #mpage {
  2.      width :100%;
  3.      min-width : 980px ;
  4.      position : relative ;
  5. _width: expression(((document.compatMode && document.compatMode== 'CSS1Compat' )? document.documentElement.clientWidth : document.body.clientWidth) < 980? '980px' : 'auto' );
  6. }

Any of the above four methods can solve the problem that IE6 does not support the min-width attribute. This site uses the fourth method.

The above simple method of min-width and min-height compatible with IE6 is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

<<:  Introduction to fourteen cases of SQL database

>>:  CSS3 click button circular progress tick effect implementation code

Recommend

Detailed explanation of jQuery's core functions and event handling

Table of contents event Page Loading Event Delega...

MySQL DeadLock troubleshooting full process record

【author】 Liu Bo: Senior Database Manager at Ctrip...

8 tips for Vue that you will learn after reading it

1. Always use :key in v-for Using the key attribu...

Docker container custom hosts network access operation

Adding the extra_hosts keyword in docker-compose....

Windows Server 2016 Quick Start Guide to Deploy Remote Desktop Services

Now 2016 server supports multi-site https service...

A brief analysis of the use of zero copy technology in Linux

This article discusses several major zero-copy te...

Dockerfile implementation code when starting two processes in a docker container

I want to make a docker for cron scheduled tasks ...

How to reset MySQL root password

Table of contents 1. Forgot the root password and...

Detailed tutorial on installing Spring boot applications on Linux systems

Unix/Linux Services systemd services Operation pr...

Building an image server with FastDFS under Linux

Table of contents Server Planning 1. Install syst...

How to make a website look taller and more designed

“How to make a website look high-end? Or more des...