Home  >  Article  >  Web Front-end  >  Detailed explanation of css compatibility examples for ie

Detailed explanation of css compatibility examples for ie

零下一度
零下一度Original
2017-06-24 14:02:471396browse

1. When making the sidebar, float the elements in the li. There will be a 4px gap between the li under IE6/7:

Solution: Add the vertical-align attribute under li, the value can be top, bottom, middle;

Extension: The vertical-align attribute is vertically centered, generally used in conjunction with table-cell, but there is no solution for compatibility with ie6/7.

2. Note: After the element is floated, margin-bottom will become invalid under IE6/7; pay attention to margin during the development process -Use of bottom.

3. Clear floating clearfix (it is said to be the most advanced method in history, compatible with IE):

. clearfix:after{

content=””;

display:block;

height :0;

line-height:0px;

## clear:both;

visibility :hidden;

}

.clearfix{

zoom:1;

}

I will sort out these things today and gradually improve them later, hehe...

The above is the detailed content of Detailed explanation of css compatibility examples for ie. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn