开发者

External Stylesheet IE7 does not connect to Drupal website

开发者 https://www.devze.com 2023-02-15 05:17 出处:网络
I\'m debugging a Drupal website and after many hours of work, I think most of the errors are solved. But there is one I can\'t figure out... When you go to the website, the \"content clear-block conte

I'm debugging a Drupal website and after many hours of work, I think most of the errors are solved. But there is one I can't figure out... When you go to the website, the "content clear-block content-record-page" div isn't loading properly in IE7. As you can see, the image and text should开发者_JAVA百科 be at the top of the parent div (as you can see in Firefox, Chrome or any other decent browser) As a matter of fact, the external stylesheet for IE7 doesn't connect at all. I've installed the Conditional Stylesheet Module and added:

; Set the conditional stylesheets that are processed by IE.

`stylesheets-conditional[lt IE 7][all][] = fix-ie.css

in the .info file of my theme. And

<!--[if lt IE 7]> 27 <link type="text/css" rel="stylesheet" media="all" href="/themes/garland/fix-ie.css" /> <![endif]-->

in my file. But Drupal still refuses to connect to the stylesheet. So am I dealing with a CSS problem or a Drupal? And what can I do about it?

Thanks in advance!


<!--[if lt IE 7]> means if LESS THAN IE 7. Meaning that conditional doesn't apply to IE7 so the stylesheet won't be loaded.

Try <!--[if IE 7]>


<!--[if lt IE 7]> 27 <link type="text/css" rel="stylesheet" media="all" href="/themes/garland/fix-ie.css" /> <![endif]-->

This is matched if the browser is IE and the version is less than 7. 7 is not less than 7, so that's why IE7 isn't working with it.

You'd need to use lte, not lt. lte means less than or equal to, so IE7 should work with that:

stylesheets-conditional[lte IE 7][all][] = fix-ie.css
0

精彩评论

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