IE6 recognition * and _, not recognized! Important
IE7 recognition *, not recognizing _, recognition! Imortant
But neither of firfox is recognized! Important
990 for framework and 1000 for non-framework
1. float: The left element allows any element to be displayed in the same row on the right of the element, whether it is an inline element or a block element. However, it still does not allow any element to be displayed with its peers on the left. Even if the code of other elements is in the front, it is allowed to be displayed with its peers only after float: left is added to the previous element.
Set the display: inline element to allow other inline elements to be displayed in the same row before and after it. If the code is displayed in the same row of the block elements in front of the Code, let the previous elements float (either left or right) or set to display: inline, there is also a block element after the code (whether it is floating, whether it is floating left or right), cannot walk with it unless set to display: inline.
In addition, setting display: inline to block-level elements is a powerful tool to solve Double Floating in the famous IE6.
2. float can change block-level elements into line elements!
3. the between-line elements only have the left and right margins, and there is no upper and lower margins, and the left and right margins are not merged! Only the vertical margin of the block box in the normal document stream can be merged. The margin between the inside box, floating box, or absolute positioning is not merged.
4. The difference in IE6's understanding of BOX leads to the doubling of the margin value of the div set to float in ie (the margin element at the block level doubles, And the float direction is the same as that of margin ), for example:
# Box {float: left; width: 100px; margin: 0 0 50px ;}
// In this case, IE will generate a PX distance.
The solution is as follows:
# Box {float: left; width: 100px; margin: 0 0 50px; display: inline ;}
// You only need to add the display: inline attribute to ignore the floating point.
5,
The sum of float elements must be less than 100%
6. the float element must specify the width attribute.
Many browsers have bugs when displaying float elements with unspecified width. Therefore, regardless of the content of the float element, you must specify the width attribute for it.
In addition, when specifying Elements, try to use em instead of px as the unit.
7. The float element cannot specify attributes such as margin and padding.
IE has a bug when displaying float elements with margin and padding specified. Therefore, do not specify the margin and padding attributes for the float element (you can nest a div inside the float element to set the margin and padding attributes ). You can also use the hack method to specify a special value for IE.