CSS3 selectors not working in Scroll PDF
- I am trying to target specific tables in a Confluence page. In my case this is the first and second table. I inspected the source of the XTHML page, located in the temporary directory Scroll PDF Exporter. I found this HTML-code for the first table:
<div class="tablewrap">
<table class="confluenceTable">
<thead class="" /> <tfoot class="" /><tbody class="">
<tr><td colspan="1" rowspan="1" class="confluenceTd"> <p>uw kenmerk
</p> </td>...</td></tr></tbody></table>
</div>
- I like to target this first table and style it, so in the Content Formatting of Scroll PDF template I put:
div.tablewrap:first-of-type table.confluenceTable {
border-bottom: 1px solid black;
border-top: 1px solid black;
border-collapse: collapse; /* single border */
}
/*first table, first row*/
div.tablewrap:first-of-type tr:first-of-type {
font-weight: bold;
}
/*first table, third row*/
div.tablewrap:first-of-type tr:nth-of-type(3) {
font-weight: bold;
border-top: 1px solid black;
}
div.tablewrap:first-of-type tr:nth-of-type(5):before {
content:"\2706"; /*telephone icon */
}
- However the first-of-type selector doesn't work. None of the CSS is applied. Can somebody help me with this issue?
-
Hi Bert,
thanks for contacting us.
Unfortunately the mentioned CSS3 selectors are currently not supported by our library Flying Saucer (nevertheless ":first" and "nth-child" are supported).
I've already created an improvement in our JIRA system: https://k15t.jira.com/browse/EXP-569
Please sign up at https://k15t.jira.com/secure/Signup!default.jspa to watch, to comment or to vote for this issue. The more votes an issue has, the more likely it is that it will implemented in one of the next releases.We'll have a look at the improvement as soon as possible.
I hope that helps.
Cheers,
Nils
Please sign in to leave a comment.
Comments
1 comment