one, float closed (clear float)
Add the following code to the globalCSS, add class= "Clearfix" to the div that needs to be closed.
<style>
. clearfix:after
{
Content: ".";
Display:block;
height:0;
Clear:both;
Visibility:hidden;
}
. clearfix
{
Display:inline-block;
}
. clearfix {Display:block;}
</style>
Second,CSS HACK
The following two methods can solve almost all of today's hack.
1,!important
With IE7 support for!important, the!important method is now only for IE6 hack. (Note the wording. Remember that the statement location needs to be advanced.)
<style>
#wrapper
{
Width:100px!important;
width:80px;
}
</style>
2, Ie6/ie77 to Firefox
*+html and *html is the unique label of IE, Firefox is not supported. And *+html is a special label for IE7.
<style>
#wrapper
{
#wrapper {width:120px;}
*html #wrapper {width:80px;}
*+html #wrapper {width:60px;}
}
</style>
Attention:
*+html's hack to IE7 must be guaranteedTop of HTMLHave the following declaration:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" ">
Float closed (clear float) and CSS HACK