问题
This is my header
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
and when I view my webpage on ie8, it pushes the Browser mode to Compact/Computability view and break the styles of my webpage. Why does it do it? I did try looking for an answer on Google and StackOverflow, but still cant figure out. Please help guys. Thanks
回答1:
The code posted should put IE into “standards mode” and does that in normal testing, but there are oddities in IE 8 in choosing the mode, such as being affected by blacklisting. Perhaps the most common explanation to problems like this that the user has selected Compatibility View for some page in the domain. This makes IE 8 show all pages from that domain (server) in “compatibility mode”. To fix this, select compatibility view settings in the “Tools” menu and remove the domain from the list.
来源:https://stackoverflow.com/questions/12945866/why-does-ie-8-push-the-view-to-compact-compatibility-view