css3 - PIE CSS works in IE9 but not IE8 -
for project, using tomcat 7 , have configured serve htc
content type of text/x-component
<?xml version="1.0" encoding="utf-8"?> <web-app ...> ... <mime-mapping> <extension>htc</extension> <mime-type>text/x-component</mime-type> </mime-mapping> </web-app>
for reason, works in ie9 (gradients, drop shadows, rounded corners) not in ie8, dont see css3 in effect @ all. in developer console under styles/tracxe styles, see behavior
don't see -pie-background
example. problem?
what might cause, seems wierd works in ie9 not ie8. don't suppose need different setup or that? css of 1 element:
#masthead { background: #0e0e0e; background: #0e0e0e; background: -moz-linear-gradient(center top, #7d7d7d 0%, #0e0e0e 100%); background: -webkit-linear-gradient(top, #7d7d7d 0%, #0e0e0e 100%); background: -o-linear-gradient(top, #7d7d7d 0%, #0e0e0e 100%); background: -ms-linear-gradient(top, #7d7d7d 0%, #0e0e0e 100%); background: linear-gradient(top, #7d7d7d 0%, #0e0e0e 100%); -pie-background: linear-gradient(top, #7d7d7d 0%, #0e0e0e 100%); behavior: url(/owmw/web/css/pie.htc); height: 35px; border: 1px solid #000000; color: #ffffff; position: relative; text-align: center; margin: 0px auto; }
i using ie10 in ie8 compatibility mode, matter?
i faced same issue , following reason problem:
- i used wrong positioning
div
element. - i targeting wrong path in
behavior
.
from code, problem seems in targeting wrong path.
behavior: url(/owmw/web/css/pie.htc);
fix: instead try refer pie.htc file in css folder , make behavior: url(pie.htc);
or
use behavior: url(owmw/web/css/pie.htc);
check out behavior property.
i might wrong, solved issue.
even tried using behavior: url(../owmw/web/css/pie.htc);
not worked.
from comments, seems you're using x-ua-compatible
fix , works through ie10 compatibility mode.
!-- force ie use latest version of rendering engine --> <meta http-equiv="x-ua-compatible" content="ie=edge">
by telling ie use latest version of rendering engine in page. incase if user opens in ie8 browser? fails.
you can check in msdn library.
hope understand.
Comments
Post a Comment