Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jerryr125
Creator III
Creator III

NPrinting - HTML - CSS formatting not displaying in email

Hi - 

I creating an NPrinting HTML report - works perfect.

When the email is sent, the formatting for the table is not displaying.

Here is the CSS:

 

 

<**head>
<**style>
table {
width:100%;
}
table, th, td {
border: 1px solid white;
border-collapse: collapse;
}
th, td {
padding: 5px;
text-align: left;
}
table#t01 tr:nth-child(even) {
background-color: #388aa7;
color: #ffffff;
font-family:Century Gothic;
font-size:12px;
text-aign: left;
}
table#t01 tr:nth-child(odd) {
background-color: #45aeca;
color: #ffffff;
font-family:Century Gothic;
font-size:12px;
text-aign: left;
}
table#t01 th {
background-color: #215a67;
color: #ffffff;
font-family:Century Gothic;
font-size:14px;
}
<**/style>
<**/head>

 

Any thoughts to why this is occurring (the ** is in the message for display purposes only)

Thanks - Jerry

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I simply don't know. I would have to test it as it is not really documented. 

I avoid using this approach due to mail clients not always working with it. Instead I usually use full inline style for each <tag> which requires it. I understand that this is a lot of work and it is hard to maintain, but given the scenarios I previously had this was the onlu reliable option. 

 

note:

my experience with this behaviour goes back few year. In this time there could be some change in how mail clients handle html content. I may spend some time testing it later..

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

5 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

When you say: When the email is sent, the formatting for the table is not displaying...." I am assuming you are reffering to HTML report embedded in email body - is that right?

If so - have you inspected what was created in email? You would notice that only BODY part of your HTML report is moved to email. Everything else is truncated...

That is why I mentioned in my previous post that you may need to use inline formatting...alternatively you may want to try to move <Style> into your <Body> section of html report

 

hope this helps

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
jerryr125
Creator III
Creator III
Author

hi - ok makes sense...

Can you 'include' a stylesheet in the html code and add the appropriate css into the style sheet  ?

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I simply don't know. I would have to test it as it is not really documented. 

I avoid using this approach due to mail clients not always working with it. Instead I usually use full inline style for each <tag> which requires it. I understand that this is a lot of work and it is hard to maintain, but given the scenarios I previously had this was the onlu reliable option. 

 

note:

my experience with this behaviour goes back few year. In this time there could be some change in how mail clients handle html content. I may spend some time testing it later..

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
jerryr125
Creator III
Creator III
Author

Yes after further research this seems to be a problem in the google mail and NOT Nprinting - thank you

HarshaPotnuru
Partner - Contributor
Partner - Contributor

Hi,

Please include the <style> tag under <body> tag. Then it will work for you.

Example:

<html>

<body>

<style>

CSS....

</style>

<table>

Enter or drag data as you like...

</table>

</body>

</html>