Small set of XHTML + CSS compatibility solutions! I will first write down some of the problems I encountered below: 1. The box models in Mozilla Firefox and IE are inconsistent, resulting in a 2px difference solution: div {margin: 30px! Important; margin: 28px;} note that the order of the two margin cannot be reversed! The important attribute ie cannot be identified, but other browsers can. Therefore, in IE, it is actually interpreted as follows: If Div {maring: 30px; margin: 28px} is repeatedly defined, it is executed according to the last one. Therefore, you cannot write only margin: xxpx! Important; web teaching network 2. the box interpretations of ie5 and IE6 are inconsistent. Div {width: 300px; margin: 0 10px 0 10px;} Div width is interpreted as 300px-10px (right filling) -10px (left filled) the final Div width is 280px, while the width on IE6 and other browsers is 300px + 10px (right filled) + 10px (left filled) = 320px. Modify Div {width: 300px as follows! Important; width/**/: 340px; margin: 0 10px 0 10px} 3. UL labels have padding values by default in Mozilla, and only margin has a value in IE. Therefore, UL {margin: 0; padding: 0;} is defined first ;} to solve most of the problems 4. the script does not support the language attribute in xhtml1.1. You only need to change the code