Home >Web Front-end >HTML Tutorial >A piece of code about float not supported by IE7 or above and FF browser_html/css_WEB-ITnose

A piece of code about float not supported by IE7 or above and FF browser_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:24:131087browse

ie7 firefox chrome ie8 float

The code is as follows:
.....
#a{
width:100px;
height:100px;
background- color:red;
border:5px solid #bbbbbb;
float:left;
}
#b{
width:100px;
height:100px;
background- color:green;
border:5px solid #bbbbbb;
}
#c{
width:100px;
height:100px;
background-color:yellow;
border:5px solid #bbbbbb;
float:left;
}
......
11

22
33

.......

My question Yes, why does it display "normal" under IE7

but "abnormal" under IE8/9, firefox and chrome? So how do I display it normally under IE8/9, firefox and chrome? ?

Reply to discussion (solution)

        #a        {            width: 100px;            height: 100px;            background-color: red;            border: 5px solid #bbbbbb;            float: left;        }        #b        {            width: 100px;            height: 100px;            background-color: green;            border: 5px solid #bbbbbb;            display:inline-block;        }        #c        {            width: 100px;            height: 100px;            background-color: yellow;            border: 5px solid #bbbbbb;        }

in Chrome and IE9

        #a        {            width: 100px;            height: 100px;            background-color: red;            border: 5px solid #bbbbbb;            float: left;        }        #b        {            width: 100px;            height: 100px;            background-color: green;            border: 5px solid #bbbbbb;            display:inline-block;        }        #c        {            width: 100px;            height: 100px;            background-color: yellow;            border: 5px solid #bbbbbb;        }

in Chrome and IE9

Thanks for the answer! What is the principle of this?


        #a        {            width: 100px;            height: 100px;            background-color: red;            border: 5px solid #bbbbbb;            float: left;        }        #b        {            width: 100px;            height: 100px;            background-color: green;            border: 5px solid #bbbbbb;            display:inline-block;        }        #c        {            width: 100px;            height: 100px;            background-color: yellow;            border: 5px solid #bbbbbb;        }

in Chrome and IE9

Thanks for the answer! What is the principle of this?

It’s just browser style recognition, the same attributes are recognized differently

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