简体   繁体   中英

IE9 (ie) Compatibility mode is breaking “select”

This is a real head scratcher for me. Our site (amyadele.com/labels/holiday-and-seasonal/…), has a price drop down in the right hand sidebar. In every browser except IE, the pricing drop down works. When you view it in ie, the drop down does not show anything. I used i9 just recently, and if I force ie9 out of compatibility mode, the drop down works.

Does anybody know a solution to this, or see what might be causing this issue?

Force IE into standards mode by starting the document with <!DOCTYPE html> , and out of compatibility mode by adding <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> in the <head> .

Seriously, in Quirks mode a browser is basically allowed to draw a sad kitten instead of your website.

Try changing your DOCTYPE tag from

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

to

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Also, don't confuse Browser Mode and Document Mode. In IE if you F12 (Developer tools) and try different combinations from the 2 menus once the page is loaded. Your 'select' works fine for me with Browser Mode: 'IE9 Compat View' and Document Mode: anything other than Quirks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM