11.高度不适应
高度不适应是当内层对象的高度发生变化时外层高度不能自动进行调节,特别是当内层对象使用margin 或paddign 时。
例:
#box {background-color:#eee; }
#box p {margin-top: 20px;margin-bottom: 20px; text-align:center; }
Solution: Add 2 empty div objects above and below the P object CSS code: .1{height:0px;overflow:hidden;} or add the border attribute to the DIV.
12. Why is there a gap under the image under IE6? There are many ways to solve this BUG. You can change the layout of the html, or set the img to display:block. Or setting the vertical-align attribute to vertical-align:top | bottom | middle | text-bottom can be solved.
13. How to align text and text input box Add vertical-align:middle;
14.web Is there any difference between id and class defined in the standard? 1. The web standard does not allow repeated IDs. For example, div id="aa" is not allowed to be repeated twice, while class defines a class. , in theory, it can be repeated infinitely, so that definitions that require multiple references can use it.
2. Priority issues of attributes
ID has a higher priority than class, see the example above
3. It is convenient for client-side scripts such as JS. If you want to perform script operations on an object in the page, you can define an ID for it. Otherwise, you can only find it by traversing the page elements and specifying specific attributes. This is a relative waste of time and resources, and is far less simple than an ID.
15. The method of displaying ellipsis after the content in LI exceeds the length This method is applicable to IE and OP browsers
17. Why can’t I define a container with a height of about 1px? This problem under IE6 is caused by the default line height. There are many solutions, such as: overflow :hidden | zoom:0.08 | line-height:1px
18. How to make the layer display on top of FLASH? The solution is to set the FLASH Transparent
19. How to vertically center a layer in the browser Here we use percentage absolute positioning, and the method of externally patching negative values. The size of the negative value is its own width and height divided by two