The FF interpretation of the box model is also different, code description: #test {width:650px!important;width:648px;padding-left:2px;background: #fff;}
Test shows the broadband is 650px
The total width of IE box is: width+padding+border+margin width sum
The total width of the FF box is width, and the width of the padding+border+margin is contained within the widths.
If there are box{width: "300"; PADDING: "5PX";}
Then box in the IE width should be: 310
and the width in FF is 300.
So it should be used in case the box has a fill.
Box{width: "290"! IMPORTANT; WIDTH: "300";}
This way to ensure that box width is always 300px, without the phenomenon of distraction
In FF, it doesn't cause a floating layer to fill up with dissatisfaction.
Five: the UL label in Mozilla has padding value, and in IE only margin have value.
Set ul{margin:0;padding:0}
CSS style for Firefox IE6 IE7
Now most of them are using!important to hack, and for IE6 and Firefox tests to be displayed properly,
However, IE7 to!important can be interpreted correctly, causing the page to not be displayed as required. Find a needle
To IE7 good hack way is to use "*+html", now with IE7 browsing, should have no problem.
Now write a CSS can do this:
#1 {color: #333;}/* Moz/*
* HTML #1 {color: #666}/* IE6 * *
*+html #1 {color: #999;}/* IE7 * *
Then in Firefox font color display for #333,ie6 under the font color display for #666,ie7 under the font color display as #999
can use "+" to realize only IE recognized CSS Hack
may have friends think of using "_" Hack, but they are distinguished, because the IE7 is not recognized "_". So use +
Test results:
IE5.5,IE6, IE7 browser can identify;
Ff2.0,opera 9,safari 2 Browser does not recognize
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.