Before discussing the BUGs of IE6 and how to fix them, it is necessary to talk about some strategies to avoid these annoying problems - the so-called nip in the bud.
IE6 market share
According to Market Share statistics, the current (August 2009) market share of IE6 is 25.25% , but the statistics in other places are obviously lower, at 18.1% ; although the statistical results are different, they all show a downward trend (translate this At the time of writing, Taobao’s IE6 users had dropped from 70% to 69% ). But the most important thing is the statistics of your own website. If you conduct traffic analysis on your website, is IE6's share worth developing for IE6? This needs to be weighed by yourself.
If the vast majority of visitors to your website do not use IE6 and do not pay you, then you do not need to specifically make it compatible with IE6, thereby saving time, energy and money.
Make a simple design
Considering the implementation of the code while designing can avoid some layout problems. No matter how complex the design draft is, it can be implemented with concise code. If you use too complicated tags, then you need to revise the design draft.
If you have rich development experience and have overcome many layout problems, record your solutions to improve development efficiency when encountering the same problems in the future.
Use appropriate documentation declaration (doctype)
Using an incorrect document declaration will trigger quirks mode. Correct document declaration can ensure that your page maintains consistent results in all browsers. Use one of the document declarations: HTML 5[/i], [i]HTML 4.01 Strict[/i], [i]HTML 4.01 Frameset[/i], [i]HTML 4.01 Transitional[/i], [i] XHTML 1.0 Strict[/i], [i]XHTML 1.0 Frameset[/i], [i]XHTML 1.0 Transitional[/i], or [i]XHTML 1.1
HTML 5
<!DOCTYPE HTML>
HTML 4.01 Strict
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd ">
HTML 4.01 Frameset
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" " http://www.w3.org/TR/html4/frameset.dtd ">
HTML 4.01 Transitional
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd ">
XHTML 1.0 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
XHTML 1.0 Frameset
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd ">
XHTML 1.0 Transitional
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
XHTML 1.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" " http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd ">