[webkit-help] Windows - loadHTMLString() not loading/using stylesheet from html page

Lakshmi P Shanmugam lakshmipriya.bms at gmail.com
Thu Feb 24 08:01:04 PST 2011

Hello all,

I'm using the Windows WebKit APIs.
I'm trying to display html content which uses an external css file as
stylesheet. I'm using IWebFrame.loadHTMLString(string, baseURL) with
The content is displayed but the style from the css is not applied on the
content. The same html content is displayed correctly with the style if I
save the html content in a file and load the URL.
I'm not sure why this is happening. I want the baseURL from the <base> tag
to be used, so I have set baseURL =0 in loadHTMLString(), is it right?
Any help/insights on using this API is appreciated.

Here is a simple html content & css file I tried with--
<base href="file:///C:/snippets/src/">
<link rel="stylesheet" href="sample.css" type="text/css">

Css file
body {
color: #660066;
background-color: green;

Thanks in Advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20110224/38af5205/attachment.html>

More information about the webkit-help mailing list