title: How to inject CSS in WebBrowser control?
body: <p>As per my  knowledge,there is a way to inject javascript into the DOM. Below is the sample code that injects javascript with the <code>webbrowser</code> control:</p>
  
  <pre><code>HtmlElement head = webBrowser1.Document.GetElementsByTagName("head")[0];
  HtmlElement scriptEl = webBrowser1.Document.CreateElement("script");
  IHTMLScriptElement element = (IHTMLScriptElement)scriptEl.DomElement;
  element.text = "function sayHello() { alert('hello') }";
  head.AppendChild(scriptEl);
  webBrowser1.Document.InvokeScript("sayHello");
  </code></pre>
  
  <p>Is there an easier way to inject css into the DOM?</p>