0

My WordPress site is having some major IE issues that include jQuery, box-shadow, and other strange CSS problems.

Would my doctype be to blame?

<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" dir="ltr" lang="en-US">
<![endif]-->
<!--[if IE 7]>
<html id="ie7" dir="ltr" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html id="ie8" dir="ltr" lang="en-US">
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html dir="ltr" lang="en-US">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>NA-net | NA&#039;s Communication Network</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="http://121.5.7.109/na_comm_new/wp-content/themes/twentyeleven-child/style.css" />
<link rel="pingback" href="http://121.5.7.109/na_comm_new/xmlrpc.php" />
<!--[if lt IE 9]>
<script src="http://121.5.7.109/na_comm_new/wp-content/themes/twentyeleven/js/html5.js" type="text/javascript"></script>
<![endif]-->
<meta name='robots' content='noindex,nofollow' />
<link rel="alternate" type="application/rss+xml" title="NA-net &raquo; Feed" href="http://121.5.7.109/na_comm_new/?feed=rss2" />
<link rel="alternate" type="application/rss+xml" title="NA-net &raquo; Comments Feed" href="http://121.5.7.109/na_comm_new/?feed=comments-rss2" />
<link rel='stylesheet' id='wp_sidebarlogin_css_styles-css'  href='http://121.5.7.109/na_comm_new/wp-content/plugins/sidebar-login/style.css?ver=3.4.1' type='text/css' media='all' />
<link rel='stylesheet' id='bbp-default-bbpress-css'  href='http://121.5.7.109/na_comm_new/wp-content/plugins/bbpress/bbp-theme-compat/css/bbpress.css?ver=2.1.2' type='text/css' media='screen' />
<link rel='stylesheet' id='slider-css'  href='http://121.5.7.109/na_comm_new/wp-content/plugins/easing-slider/css/slider.css?ver=1.2' type='text/css' media='all' />
<script type='text/javascript' src='http://121.5.7.109/na_comm_new/wp-content/plugins/easing-slider/js/jquery.js?ver=1.4.2'></script>
<script type='text/javascript' src='http://121.5.7.109/na_comm_new/wp-content/plugins/sidebar-login/js/blockui.js?ver=1.0'></script>
<script type='text/javascript'>
4

2 に答える 2

1

Doctype は問題ありませんが、これを使用することをお勧めします。

<!DOCTYPE html>
<!--[if lt IE 6]>      <html class="lt-ie9 lt-ie8 lt-ie7 lt-ie6"> <![endif]-->
<!--[if IE 6]>         <html class="lt-ie9 lt-ie8 lt-ie7 ie6"> <![endif]-->   
<!--[if IE 7]>         <html class="lt-ie9 lt-ie8 ie7"> <![endif]-->
<!--[if IE 8]>         <html class="lt-ie9 ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="modern"> <!--<![endif]-->
<head>
...
于 2012-09-06T10:50:21.890 に答える
0

コードが標準に準拠していれば、doctype が問題を引き起こしている可能性は低いです。(明らかに、簡単な確認方法は簡単です。HTML4.01 doctype に変更して、何かが自動的に修正されるかどうかを確認してください!)「一般的な」HTML doctype は、最新のすべてのブラウザーで標準モードをトリガーする必要があり、従来のブラウザーでさえ、完全または標準モードに切り替える必要があります。doctypeが存在する場合は標準モードに近い。質問でIE9にタグを付けた場合、問題は、IE9がCSS 2.1を過ぎて部分的にしか標準に準拠していないことが原因である可能性があります。問題を個別に切り分けることをお勧めします。

Box-shadow: MDNによるとborder-collapse:seperate、IE で動作する ように明示的に設定する必要がある場合があります。
その他:条件付きコメントを使用して IE6-8 を嗅ぎつけているようです。おそらく、これを IE9 に拡張する必要がありますか? また、厄介なインライン CSS ハックにも注意してください...

于 2012-09-06T10:51:44.557 に答える