Today, when I checked my website, I found that the layout was messy, so I decided to change it. However, my website is basically written based on Div + CSS. At that time, I only had IE6 on the machine, so it was normal when I only browsed IE6.
I installed a FF on my machine last year and made some modifications to ff. Now I have to make changes to IE7 again. I don't know when to make any changes to IE8. I believe IE8 will be available soon. Now it seems that I already have a test version in English. I have never seen this.
Basically, the problem I encountered was that IDV was highly adaptable to content and IDV was highly centered. I went to Baidu to find some information and tried several methods. I feel like I am using it! The best way is to combine important with Min-height. Other methods make me feel weird and uncomfortable. Try this method first.
GenerallyCodeYes:
Div # layout {
Height: Auto! Important;/* auto for non-IE 6 height */
Min-Height: 100px;/* For IE7 */
}
Of course, IE6 automatically adapts to this problem by default.
another problem is vertical center, which utilizes several features of IE6 IE7, such :! Important, *
the code is as follows
Div # HL {
vertical-align: middle;/* It is used to center IE7 but cannot contain padding, does not work for IE6 and FF */
* padding: 0px! Important;/* IE7 execution of IE6 will also execute FF not to execute */
/* the height of my entire div is 120, there is an image height of 60 in the middle, so the upper and lower padding is 30px */
padding: 30px 0;/* Run IE6 and FF */
}