Home  >  Article  >  Web Front-end  >  IE Bug--Solution to double distance of patches outside floating objects_Experience exchange

IE Bug--Solution to double distance of patches outside floating objects_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:09:231930browse

The IE Doubled Float-Margin Bug IEBug--Double distance of patches outside floating objects

First look at the following code:

#box{
background: ThreedFace;
width: 500px;
height: 400px;
}

#box1{
float: left;
background: #F2F2F2;
width: 300px; height: 200px ;
margin-left: 50px; Demo.


The solution is to
add: display: inline; in the code of box1, so that the floating is ignored and double distance will not be generated in IE.
Demonstration
, more detailed information can be found here.

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