开发者

Explorer not loading conditional style-sheet in Wordpress site

I have a wordpress site I am using ie conditional comments to load in an ie specific stylesheet in to. For some reason the changes made aren't being reflected in IE's rendering:

I have tried:

  • clearing browser history
  • deleting and re-uploading the file
  • ensuring the conditional com开发者_如何学运维ment is correct
  • closing all browsers and restarting
  • checking the file path
  • Adding php style now() to force refresh

And I've reached a point where I'm baffled.

What else can I try?

edit:

the code:

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>K9 Heaven - 21st Century Dog Care</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="http://www.k9heaven.org.uk/wp-content/themes/k9_0.2/style.css" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" media="all" href="ie.css" />
<![endif]-->

<link rel="pingback" href="http://www.k9heaven.org.uk/xmlrpc.php" />

<!--[if lt IE 9]>
<script src="http://www.k9heaven.org.uk/wp-content/themes/k9_0.2/js/html5.js" type="text/javascript"></script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="K9 Heaven &raquo; Feed" href="http://www.k9heaven.org.uk/?feed=rss2" />
<link rel="alternate" type="application/rss+xml" title="K9 Heaven &raquo; Comments Feed" href="http://www.k9heaven.org.uk/?feed=comments-rss2" />
<link rel="alternate" type="application/rss+xml" title="K9 Heaven &raquo; Home Comments Feed" href="http://www.k9heaven.org.uk/?feed=rss2&amp;page_id=49" />
<link rel='stylesheet' id='NextGEN-css'  href='http://www.k9heaven.org.uk/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0' type='text/css' media='screen' />
<link rel='stylesheet' id='shutter-css'  href='http://www.k9heaven.org.uk/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.css?ver=1.3.2' type='text/css' media='screen' />
<script type='text/javascript' src='http://www.k9heaven.org.uk/wp-includes/js/l10n.js?ver=20101110'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var shutterSettings = {
    msgLoading: "L O A D I N G",
    msgClose: "Click to Close",
    imageCount: "1"
};
/* ]]> */
</script>
<script type='text/javascript' src='http://www.k9heaven.org.uk/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js?ver=1.3.2'></script>
<script type='text/javascript' src='http://www.k9heaven.org.uk/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>
<script type='text/javascript' src='http://www.k9heaven.org.uk/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.88'></script>
<script type='text/javascript' src='http://www.k9heaven.org.uk/wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js?ver=1.05'></script>

<script type='text/javascript' src='http://www.k9heaven.org.uk/wp-includes/js/comment-reply.js?ver=20090102'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.k9heaven.org.uk/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.k9heaven.org.uk/wp-includes/wlwmanifest.xml" /> 
<link rel='index' title='K9 Heaven' href='http://www.k9heaven.org.uk' />
<link rel='prev' title='Contact' href='http://www.k9heaven.org.uk/?page_id=25' />
<meta name="generator" content="WordPress 3.2.1" />

<!-- All in One SEO Pack 1.6.13.3 by Michael Torbert of Semper Fi Web Design[395,435] -->
<meta name="description" content="K9 Heaven - 21st Century Dog Care" />
<meta name="keywords" content="K9,Heaven,21st,Century,Dog,Care" />
<link rel="canonical" href="http://www.k9heaven.org.uk/" />
<!-- /all in one seo pack -->

<meta name='NextGEN' content='1.8.3' />
    <style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>

</head>

http://www.k9heaven.org.uk/

Feel free to close this thread, forgot that relative css paths in wordpress themes go to the site root, not the theme root. And won the stupid hat.


Is this

http://www.k9heaven.org.uk/ie.css

the sheet you're tyring to load? or is it this:

http://www.k9heaven.org.uk/wp-content/themes/k9_0.2/ie.css

The code above is referencing the first style sheet at the root of the site. That's non-standard. You should use <?php get_theme_root() ?> in the style sheet link in the theme files to target the style sheet in the theme folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜