Lazarus
Programming => Packages and Libraries => Lazarus Extra Components => Topic started by: Manlio on July 26, 2020, 01:33:43 am
Title:
TIpHtmlPanel and CSS [solved]
Post by:
Manlio
on
July 26, 2020, 01:33:43 am
I'm trying to display an HTML page with a TIpHtmlPanel, but I cannot get the CSS declared in a <style> tag to work.
For example, I load the following string with SetHtmlFromStr():
Code: Text
[Select]
[+]
[-]
<html>
<head>
<style>
.bold { font-weight:bold; }
</style>
</head>
<body>
<p style="font-weight:bold;">Para 1, this becomes bold</p>
<p class="bold">Para 2, this does NOT become bold</p>
</body>
</html>
When loading the above, "Para 1" (with the inline style attribute) becomes bold as expected, but "Para 2" does not.
Is the <style> tag supported? Am I using it wrong? What should I do instead?
Any help will be greatly appreciated!
Title:
Re: TIpHtmlPanel and CSS
Post by:
Manlio
on
July 26, 2020, 01:43:28 am
OK, I found the error, instead of <style> I must use the full version:
<style type="text/css">
TinyPortal
© 2005-2018