Before discussing IE6 bugs and how to fix them, it is necessary to talk about some strategies to avoid these annoying problems.
IE6 Market share
According to Market Share statistics, the current market share of IE6 is 25.25%, but the statistics in other places are significantly lower, at 18.1%. Although the statistical results are different, they all show a downward trend (translation here At the time of writing, Taobao’s IE6 users have fallen from 70% to 69%). But the most important thing is the statistics of your own website. If you have performed traffic analysis on your website, is the share of IE6 worth developing for IE6? This requires you to weigh it yourself.
If most of your website visitors do not use IE6 and do not pay you, then you do not need to be compatible with IE6, thereby saving time, energy and money.
Make a simple design
While designing, considering the implementation of the code 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 labels, you need to revise the design draft.
If you have rich development experience, overcome many layout problems, record your solutions, and improve development efficiency when encountering the same problems in the future.
Use the appropriate documentation statement (doctype)
Using a wrong document declaration will trigger quirks mode. The correct document declaration can ensure that your page maintains consistent results across all browsers. Use one of the documents to declare: 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 ">