Hi,
I don’t have a link for the external CSS but below is the css file content. The below css is applied when I am on a windows environment, but when I deploy it to Solaris environment it does not work. For a workaround solution I have to define constant containing the styles like highlight and h1 tag. By doing that the highlight works fine but for h1 it applies the color and font-family but not the size. Below is the code.
private static final String HIGHLIGHT_STYLE = ".highlight{background-color:#fff7d5;}";
private static final String H1_STYLE = ".h1{color:#993366;font-style:bold;font-family:verdana;font-size:18;}";
private static final String H2_STYLE = ".h2{color:#993366;font-style:bold;font-family:verdana;font-size:16;}";
private static final String H4_STYLE = ".h4{color:#993366;font-family:verdana;font-size:12;}";
private String addCssContent(){
String style = StringUtils.EMPTY;
style = "";
style += HIGHLIGHT_STYLE;
style += H1_STYLE;
style += "";
return style ;
}
I call the above method before inserting html content using builder object.
builder.insertHtml(addCssContent + htmlText);
CSS Content
body
{
font-family: Verdana;
color: #333;
background-color: #fff;
margin: 20px;
}
.highlight
{
background-color:#fff7d5;
}
h1
{
font-style: bold,
color: #993366,
font-size: 18,
font-family: verdana
}
Regards,