Floating issues such as the following are listed below if you are not considered welcome Welcome to add:
1. Floating, compatibility issues 3px issues, bilateral distance issues
In the process of ordinary work, solve the problem of 3px, generally is the initialization of *{margin:0;padding:0px;} But perhaps the interviewer's consideration in the interview is not another, but to ask you do not understand the CSS hack problems
Compatible with IE7 under separate processing with unique "*+" is only compatible with IE7 here; for example {margin-left:20px;_margin-left:17px;}
Use unique "_" when the compatibility is handled separately under IE6, for example. a{margin-left:20px;_margin-left:17px;}
IE6, IE7 are compatible with "+" for example. a{margin-left:20px;+margin-left:17px;}
2, at the same time, when there is a margin in the same direction of the value of the time will create a bilateral distance problem
For example. a{margin-left:20px;float:left;} At this time in the IE browser will create a bilateral distance, the solution is to directly add a display:inline can be resolved. a{Margin-left:20px;float:left;display:inline} There's no problem at this point.
3, there is a three-column layout of the situation (both sides have a width of 100px of a column of Div, the middle of the width of 100%; As the width of the browser changes, automatic stretching)
There are many ways to write layouts I write a simple example
. div1{width:100px; height:100%; background: #000000;p osition:fixed; left:0px; top:0px; z-index:22}
. div2{width:100%; height:100%;margin:0px 100px 0px 100px; background:red;position:fixed; left:0px; top:0px; right:0px; Z-index:1}
. div3{width:100px; height:100%; background: #000000;p osition:fixed; right:0px; top:0px; z-index:22}
<div class= "Div1" ></div>
<div class= "Div2" ></div>
<div class= "Div3" ></div>
Web front-end questions about floating