Some tips for div css design

recently in the garbage station, see more and more garbage station, with a few words to describe, completely absorbed in making money, this a little right, site may in IE6 is very intuitive to IE7 apart, table table. is set inside the whole W3C thing a few years back, I was doing the project, I just want to say a few words, and not to catch mice is a good cat cat. You are making money at the same time, also give users a good sense, so perhaps you remember the station will be more and more people, so as to get rid of Baidu search engine. At the same time also the Internet a good development trend of.

below are some tips to collect and study. Non web designers avoid watching, otherwise, you will halo… :}

CSS compatibility tips

1, FF to set the padding after the div will lead to the increase of width and height, but IE will not (available! Important solution)

2, centered problem.


) vertical center. Line-height is set to div the same height, and then through the vertical-align: middle. (note the content not newline.)

2). Level centered. Margin: 0 Auto; (not universal)

3, if you want to add the contents of the a tag style, you need to set up display: block (common navigation tags)

4, FF and IE on the understanding of the difference between the 2px led to a difference of div as well as float under the IE margin double BOX and other issues.

5, UL tags in the FF below the default list-style and padding. It is best to declare in advance, to avoid unnecessary trouble (common in navigation tags and content list)

6, as an external wrapper div do not set dead height, it is best to add overflow: hidden. to achieve a high degree of adaptive.

7, on the hand shaped cursor. Cursor: pointer. and hand is only applicable to IE.

1 for Firefox IE6 CSS style


is now mostly used! Important to hack, for IE6 and Firefox test can be displayed,

but IE7 yes! Important can be interpreted correctly, and the page will not be required

Leave a comment

Your email address will not be published.