CSS gradient not rendering in Windows Phone 8 WebBrowser Control

Posted by SRSHawk on Super User See other posts from Super User or by SRSHawk
Published on 2012-11-25T03:01:51Z Indexed on 2012/11/25 5:06 UTC
Read the original article Hit count: 460

Filed under:
|

I am facing an issue where, the CSS3 background is not rendered in WebBrowser control in Windows Phone 8. But same HTML when opened in WebBrowser in Windows Phone 8, it renders the gradient

The HTML I am using is:

<html>
<head>
<meta name="viewport" content="width=320, user-scalable=no, minimum-scale=1, maximum-scale=1"/>
</head>
<body style="margin:0px;overflow:hidden;"> 
        <div id="im_c" style="height:48px;width:100%25;  background: -ms-linear-gradient(
             bottom,                
             #432100 30%,               
             #00AAAA 70%);"> 
            <div style="margin:0 auto;width:320px;">
                Test
                </div> 

        </div> 
        <style> 
            body {margin:0px} 
        </style> 
</body>

In Windows Phone 8, I use the HTML as below:

WebBroswer WebView = new WebBrowser();
WebView.Height = 100;
WebView.Width = 400;
WebView.NavigateToString(@"<html><head><meta name=""viewport"" content=""width=320, user-scalable=no, minimum-scale=1, maximum-scale=1""/></head><body style=""margin:0px;overflow:hidden;""> <div id=""im_c"" style=""height:48px;width:100%25; background: -ms-linear-gradient(         bottom,                 #432100 30%,                #00AAAA 70%);""> <div style=""margin:0 auto;width:320px;"">Test</div></div> <style> body {margin:0px} </style> </body></html>");

In this case, the CSS gradient is not visible.

Am I missing something?

© Super User or respective owner

Related posts about css

Related posts about windows-phone-8