George Kierstein
Posts: 47
Joined: 2013-05-04
|
Hi,
I have the URL to several style sheets that I want to embed in a page. The example uses a createStyleSheet call:
for (int i = 0; i < cssCount; i++)
{
mshtml.IHTMLStyleSheet styleSheet = this.HTMLDocument.createStyleSheet("", 0);
string url = mVersionObj.GetCss(i);
styleSheet.href = url;
}
This doesn't do what I would expect. It does some strange alteration to the <head> tag (something with a JQuery in it) and although it does appear to put *something* as a style sheet its not creating a style sheet with a ref in it.
Am I looking to actually embed a <link> tag instead ?
i.e. <link href="http://some.style.com/sheet.css" rel="stylesheet" type="txt/css"/>
How would I go about getting them properly embedded ?
Thanks
G |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi George,
Please try to change the code as shown below:
for (int i = 0; i < cssCount; i++)
{
string url = mVersionObj.GetCss(i);
mshtml.IHTMLStyleSheet styleSheet = this.HTMLDocument.createStyleSheet(url, 0);
}
|
|