Conditional formatting tags not working in IE8

2019-06-05 04:05发布

I am currently working on a web development where I am now doing my formatting to please IE 8 or newer. I have done this for previous browser versions, but not ie8. My issue is that my conditional formatting tags are no longer working for this version of IE. Has something changed?

page: http://domain/includes/file.php

css file: http://domain/css/cssIE8.css

the tag in my page is as follows:

    <!-- [if gte IE 7]>
    <p>Show this in IE</p>
    <link href="../css/profileIE8.css" rel="stylesheet" type="text/css" />
    <![endif]-->

When I remove the conditional formatting tags, all the other browsers find the file just fine. Any thoughts?

I even placed the <p> tag in there to see if it would display in the page, it doesn't. My understanding is that this specific conditional formatting tag would apply to all Internet Explorer versions NEWER than v7

2条回答
仙女界的扛把子
2楼-- · 2019-06-05 04:26

You state:

When I remove the conditional formatting tags, all the other browsers find the file just fine. Any thoughts?

Not sure how that is true, as your href is ../css/profileIE8.css, but the file path you gave as your css is http://domain/css/cssIE8.css so the file names are different. Unless you mistyped one here, your href does not match your file path, and thus it is not finding the css file.

查看更多
Juvenile、少年°
3楼-- · 2019-06-05 04:33

The space between <!-- [if.. should be removed. Hope it helps!

<!--[if gte IE 7]>
    <p>Show this in IE</p>
    <link href="../css/profileIE8.css" rel="stylesheet" type="text/css" />
    <![endif]-->

More info can be found here: http://msdn.microsoft.com/en-us/library/ms537509(v=vs.85).aspx

查看更多
登录 后发表回答