leora
leora

Reputation: 196459

Why aren't my Internet Explorer conditional formats working?

I have the following code in css:

<!--[if IE 7]>
 <style type="text/css">.slider li .slider-content{margin-left:-605px;}</style>
<![endif]-->

<!--[if gte IE 8]>
<style type="text/css">.slider li .slider-content{margin-left:-630px;}</style>
<![endif]-->

I am testing in IE9, when i choose IE8 Standards mode and look in the Internet developer tools i see that the margin-left: -605px (instead of -630px)

Can you think of any reason why this code in IE8 mode would use the IE7 settings?

Upvotes: 1

Views: 123

Answers (2)

SolutionInjected
SolutionInjected

Reputation: 11

include this meta tag in you web page to enable IE8 mode:

 < meta http-equiv="X-UA-Compatible" content="IE=8" />

Upvotes: 1

Guffa
Guffa

Reputation: 700242

The browser version is determined by the Browser Mode setting, not the Document Mode setting.

If you choose Browser Mode "IE 7" and Document Mode "IE 8 Standards", it will use IE 7 to determine the conditional code.

Upvotes: 1

Related Questions