


Solution to the problem that max-width and min-height are not supported by IE6
Today I will bring you a solution to the problem that max-width and min-height are not supported by IE6.
We often set the minimum height of a page to achieve beautiful display even when the content of the entire page is not enriched. Sometimes when setting the maximum width of the image without exceeding the set width, we can set a minimum height using min- height, and set the maximum width limit using the max-width CSS attribute. But the problem is that IE7 and above versions support it, but only IE6 does not support min-height, MAX-height, max-width, min-width. What should I do?
DIVCSS5 introduces a solution using css hack. As we all know, generally we set the width or height of the object. If the picture or content is larger than the set width, IE6 will break the set width and height. This is what we can do Use this and IE6's unique CSS recognition to match "_" to solve the problem
For example, we need to set a minimum height of 500px for a web page to look good, but what should we do if IE6 does not support it?
We just use CSS properties to read from left to right and replace the bottom and right CSS property values with repeated properties from top to bottom.
The specific CSS code is as follows:
.div{min-height:500px;_height:500px;}
Note: Be sure to pay attention to the order. The former is supported by all IE, Firefox, and Google in IE7 and above, while the latter is only supported by IE6, so it is just right to take advantage of it. This CSS HACK and CSS read order solve this problem.
Of course, there is also the following CSS code:
.div{height: expression(this.height> 500 ? 500 : true); max-height: 500px;}
However, this CSS code will cause the image to not be displayed normally after loading (the image will be randomly reduced and cannot be displayed normally)
So we recommend using min-height:500px;_height:500px; to solve the problem of IE6 not being able to use max and min attributes.
# I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
Answers to questions about camel case naming and JS
Boolean values, relational operators in JS, Detailed explanation and examples of logical operators
## Summary of the front-end js framework and explanation of its uses
The above is the detailed content of Solution to the problem that max-width and min-height are not supported by IE6. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

It's no secret that Internet Explorer has fallen out of favor for a long time, but with the arrival of Windows 11, reality sets in. Rather than sometimes replacing IE in the future, Edge is now the default browser in Microsoft's latest operating system. For now, you can still enable Internet Explorer in Windows 11. However, IE11 (the latest version) already has an official retirement date, which is June 15, 2022, and the clock is ticking. With this in mind, you may have noticed that Internet Explorer sometimes opens Edge, and you may not like it. So why is this happening? exist

More and more users are starting to upgrade the win11 system. Since each user has different usage habits, many users are still using the ie11 browser. So what should I do if the win11 system cannot use the ie browser? Does windows11 still support ie11? Let’s take a look at the solution. Solution to the problem that win11 cannot use the ie11 browser 1. First, right-click the start menu and select "Command Prompt (Administrator)" to open it. 2. After opening, directly enter "Netshwinsockreset" and press Enter to confirm. 3. After confirmation, enter "netshadvfirewallreset&rdqu

Recently, many win10 users have found that their IE browser always automatically jumps to the edge browser when using computer browsers. So how to turn off the automatic jump to edge when opening IE in win10? Let this site carefully introduce to users how to automatically jump to edge and close when opening IE in win10. 1. We log in to the edge browser, click... in the upper right corner, and look for the drop-down settings option. 2. After we enter the settings, click Default Browser in the left column. 3. Finally, in the compatibility, we check the box to not allow the website to be reloaded in IE mode and restart the IE browser.

June 15, 2022 is the day when Microsoft ends support for Internet Explorer 11 (IE11) and closes its legacy browser chapter. The company has been reminding users of this end-of-life date for some time and calling on them to plan a move to Microsoft Edge. Microsoft bundles IE11 with Windows 8.1 as the modern default web browser for Windows. Although it never reached the (current) heights of Chrome, it was the second most used desktop browser in 2014, behind IE8. Of course, with 20

Solutions to IE shortcuts that cannot be deleted: 1. Permission issues; 2. Shortcut damage; 3. Software conflicts; 4. Registry issues; 5. Malicious software; 6. System issues; 7. Reinstall IE; 8. Use third-party tools; 9. Check the target path of the shortcut; 10. Consider other factors; 11. Consult professionals. Detailed introduction: 1. Permission issue, right-click the shortcut, select "Properties", in the "Security" tab, make sure you have sufficient permissions to delete the shortcut. If not, you can try running as an administrator, etc.

How to enable IE acceleration function? IE is too slow to open web pages, we can enable hardware acceleration mode in it. Many friends reported that when using IE browser, the speed of opening web pages is extremely slow, which also has a certain impact on our browsing of the web. I just want to ask the editor if there is any solution. In this case, you can turn on the hardware acceleration mode of the IE browser. The editor has compiled the method of turning on the acceleration function of IE. If you are interested, take a look below! To enable the acceleration function in IE, open the IE secure browser, click the gear-shaped "Settings" icon in the upper right corner, and select "Internet Options" to enter, as shown in the figure. 2. Click "Advanced" in the tab navigation at the head of the Internet Options window, as shown in the figure. 3.

How to uninstall ie9 from win7? Computers can handle things at work and can also be used for watching TV shows. Just like watching TV dramas, we usually use browsers to watch them. Because there are more and more browsers and their functions are perfect, fewer and fewer people are using ie9 browser now. So how to uninstall the browser in win7? Take a look at win7 How to uninstall IE9 browser from the system. How to uninstall ie9 browser from win7. 1. First, double-click to open MyPC and choose to uninstall or replace the program; 2. Then find "ViewInstallUpdate" and click on it. You can find "windows internet explorer9" inside, then right-click to delete. The above is the editor with wi

Many users are accustomed to using the Internet Explorer browser of Windows, but find that after upgrading the Win11 system, the Internet Explorer browser cannot be found in the system. Therefore, if they want to know whether Win11 comes with the Internet Explorer browser, let’s follow the editor to see Just give it a try. Does win11 come with IE browser? Answer: Win11 does not come with IE browser. 1. Microsoft has previously stated that the win11 system will no longer come with its own IE browser. 2. However, we can enable ie mode through the edge browser in win11. 3. First click on the three dots in the upper right corner, as shown in the picture. 4. Then click "Settings" in the menu that opens. 5. Then find and enter "Default Browser" in the left sidebar 6. In it, IE mode will be allowed
