Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I tried to add id or class in the html elements in the html report, then applied the style (as css) in the style but it doesn't work. Does nprinting only support to add those style in the html element individually? not able to group it by id or class in header or css stylesheet?
Hi Ming,
You can use the <style> tag in the header section of the document to create CSS rules that you can then apply. You will need to uncheck the Keep Source Formats table property.
In the template:
Output:
HTH - Daniel.
Hi, Ming,
I think it works.
Just test a simple .html report:
html as below:
<html>
<head>
<style>
h2.first {text-align:center}
</style>
</head>
<body>
<h2 class="first">Part 1 </h2>
<h2 class="second">Part 2 </h2>
</body>
</html>
And just open the html report in browser, it works. Or maybe I wrongly understand your requirement?
Zhihong
Hi Ming,
You can use the <style> tag in the header section of the document to create CSS rules that you can then apply. You will need to uncheck the Keep Source Formats table property.
In the template:
Output:
HTH - Daniel.
thanks so much for all your help!
Hello Daniel,
This works ok if you open the html in a browser but there is a downside: I you intend to attach the HTML to the body of an email, you have to apply inline css styling in order to work (internal css don't work at least for me).
Best Regards.
I agree with Martin, however it is not NPrinting related issue, but rather mail client problem
Hi @martin_escobar ,
I agree with @Lech_Miszkiewicz ; different email clients render the same email body in different ways. There are third party only tools to test the HTML email bodies and display the results on different cliente. I found those services useful to solve customer formatting issues in the past.
Best Regards,
Ruggero