0

I have the following HTML and CSS File : https://jsfiddle.net/zhta2z8s/ . C# code :

 Web.Source = new Uri(@"pack://siteoforigin:,,,/app.html");
Where Web is a WebBrowser. In that WebBrowser border-radius doesn't work for code TAG and pre TAG. Why ? What I should do ?

1 Answers1

0

That is because WebBrowser emulates Internet Explorer (I believe, in your case, IE7), and border-radius is only supported on IE9+.

You can check the IE version you're using with WebBrowser.Version

Gets the version of Internet Explorer installed.


I found a blog post tutorial on how to change the default IE version, but here's the sum up:

  • If you have control over the HTML you're displaying:

    • If you want the latest possible IE version:

      Add the following tag to your <head>:

      <meta http-equiv="X-UA-Compatible" content="IE=edge" />
      
    • If you want a specific IE version

      Check this answer with the list of <meta> tags.

  • If you don't have control over the HTML:

    Well, it's complicated. That requires that you edit the FEATURE_BROWSER_EMULATION key in the Windows Registry. You can check this answer that teaches exactly how to do that.

Community
  • 1
  • 1
Matheus Avellar
  • 1,411
  • 1
  • 22
  • 29