How do I make a WebKit WebView use a CSS style sheet?

You might need to include an html <base> element to tell the webview where it shoul be looking for the css files.


Another alternative would be to use the user stylesheet preference of the WebView:

WebView* webView = /* snip */;
webView.preferences.userStyleSheetEnabled = YES;
webView.preferences.userStyleSheetLocation = [NSURL fileURLWithPath:@"my/stylesheet.css"];

Assuming that the style data can be reached with an URL, this is probably the simplest way to do it.