Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Box-Shadow in IE9 View modes: 
User avatar
Member
Member
stewart_b - 7/11/2011 2:39:00 PM
   
Box-Shadow in IE9
Hi all, i'm really struggling with this.

I can't seem to get an applied Box-Shadow css3 element to apply to my content. it works fine under chrome and firefox, but in IE it doesn't appear to apply. Also when i add the style inline it seems to get removed.

I tested this by adding it to the Div, inline in my master page and then viewing the source. i was left with an empty style tag. I also see that the body is getting a class of LTR IE7 ENUS. This doesn't seem like correct behvaior to me.

Can anyone help me out?

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 7/12/2011 8:49:40 AM
   
RE:Box-Shadow in IE9
Hello,

Could you please provide us with more details?

Firstly, what's your current Kentico CMS version? Do you have applied any hotfixes?

Is your site live? If so, may I ask you to provide us with link so that we could inspect it further? Please give us particular spot you have problem with.

As for the missing inline style - where exactly are you adding it?

Thank you in advance for info.

Best regards
Ondrej Vasil

User avatar
Member
Member
stewart_b - 7/12/2011 4:38:53 PM
   
RE:Box-Shadow in IE9
Sure,

Current Version is this v5.5.3996 R2 I don't believe we have any hotfixes applied.

I applied the inline style directly to the master page in the form like this.

<!-- Content container -->
<div class="mainDiv" style="box-shadow: 0 0 10px 2px #888;" >

I was mistaken about it being stripped from the source. It only shows as being stripped when you view it in the developer tools in IE9. (F12) I'm just trying to figure out if this is perhaps related to the doctype or something along those lines. Again this works perfectly in non kentico pages.

<body class="LTR IE7 ENUS" >

This line also appears at the top, which seems to apply browser specific code.

The site is not currently live.

Thanks for the feedback.

User avatar
Certified Developer 9
Certified Developer 9
charbf - 7/13/2011 8:52:25 PM
   
RE:Box-Shadow in IE9
Hi,

if you have <body class="LTR IE7 ENUS" > it's because you viewing the site in Browser mode IE7.

IE7 does not support box-shadow.


Franck

User avatar
Member
Member
stewart_b - 7/14/2011 8:25:12 AM
   
RE:Box-Shadow in IE9
Sorry if this wasn't clear before, but the browser that i'm using is IE9.

I believe that IE9 did away with compatibility mode.

User avatar
Member
Member
stewart_b - 7/14/2011 8:58:07 AM
   
RE:Box-Shadow in IE9
Wow, i had to look up that feature you mentioned you are absolutely right, it was rendering in Browser Mode IE7, and as soon as i switched it then it changed over.

I guess my next question is does anyone know what would cause browsers to default to this? My doctype that is rendering on the site is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Should i be using something else? Where in kentico can we change this value?




User avatar
Certified Developer 9
Certified Developer 9
charbf - 7/14/2011 9:05:25 AM
   
RE:Box-Shadow in IE9
Hi,

It can be set at multiple Levels

1. in IIS as a forced meta tag
2. Site level (in web config)
3. Page In the meta tags of a specific page

for more info
http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx#SetMode




User avatar
Member
Member
stewart_b - 7/14/2011 9:18:15 AM
   
RE:Box-Shadow in IE9
I found the location to change it and tried a few different doctypes, so far i've had no success on getting this to detect properly.

i tried
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

and

<!DOCTYPE html>

User avatar
Certified Developer 9
Certified Developer 9
charbf - 7/14/2011 8:59:40 AM
   
RE:Box-Shadow in IE9
Hi,

IE9 can be use in compatibility mode. it can also be forced by a meta tag.

What I'm refering to is Browser mode. wich make IE9 work as IE7 or IE8.

If you hit F12 there is a debug window. The bar at the top gives you the posibility to change the Browser mode

User image

So if Kentico detect your IE9 as IE7 it's because your viewing the page in Browser mode IE7 as in the image

Franck

User avatar
Member
Member
stewart_b - 7/14/2011 10:08:13 AM
   
RE:Box-Shadow in IE9
okay, I'm getting Browser Mode: IE9 Compatibility and Document Mode IE7 Standards

i tried adding:
<meta http-equiv="X-UA-Compatible" content="IE=9" />

also switched that to
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />

and neither of these worked. I've tried a couple of different doctypes in combination with these.

None of these have helped.


My BrowserMode is showing as IE9 Compat View and the DocumentMode: IE7 Standards.

I just can't seem to get it to switch over.

User avatar
Member
Member
stewart_b - 7/14/2011 10:49:30 AM
   
RE:Box-Shadow in IE9
I think it's possible that internally we're forcing the compatibility view setting with a group policy. Which would explain why nothing i'm attempting that should work is working.

I'll retest tonight from a clean machine thats not on the network and see if that corrects it.

Thanks for your help.