Reputation: 393
I am using webview to load the html string it loads the data but it does not change the text colour i am also changing colour but it does not get effect.
NSString *myDescriptionHTML = [NSString stringWithFormat:@"<html> \n"
"<head> \n"
"<style type=\"text/css\"> \n"
"body {font-family: \"%@\"; font-size: %@; text-colour:red}\n"
"</style> \n"
"</head> \n"
"<body>%@</body> \n"
"</html>", @"helvetica", [NSNumber numberWithInt:18], texts];
It shows default colour not the new one given
Upvotes: 0
Views: 32
Reputation:
The issue is in your CSS code so simply replace
"body {font-family: \"%@\"; font-size: %@; text-colour:red}\n"
with
"body {font-family: \"%@\"; font-size: %@; color:red}\n"
Hope that will work
Upvotes: 3