HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › Nested CSS definitions not rendered
- This topic has 16 replies, 4 voices, and was last updated Mar 22, 2011
14:48:15 by PD4ML.
-
AuthorPosts
-
August 24, 2009 at 15:13#26250
Hi,
is it correct that nested CSS definitions like
.tableclass td{
…
}are not picked up in the output pdf?
August 25, 2009 at 17:41#27464Pd4ML does support CSS selectors like “.tableclass td”. Among the supported CSS selector types are the following:
- * Universal selector
- E Type selectors
- E F Descendant selectors
- E > F Child selectors
- E:first-child The :first-child pseudo-class
- E + F Adjacent selectors
- E[foo] Attribute selectors
- E[foo=”warning”] Attribute selectors
If for some reason it does not work for you, I would check if CSS properties (in your message they are substituted with “…”) are supported by PD4ML. See the list of supported CSS properties: http://pd4ml.com/css.htm
November 24, 2009 at 22:36#27465I am trying to use adjacent selectors to size columns in a datatable. td+td works for me, but the third column, td+td+td doesn’t -I just get the td+td CSS. It displays fine in FF & IE. Is this an issue or am I doing something wrong?
<br /> ..datatable_3col {<br /> width: 100%;<br /> background-color: #99FFFF;<br /> }<br /> .datatable_3col td, .labels td {<br /> width:200px;<br /> background-color: red;<br /> }<br /> .datatable_3col td+td, .labels td td {<br /> width:250px;<br /> background-color: yellow;<br /> }<br /> .datatable_3col td+td+td, .labels td td td{<br /> width:270px;<br /> background-color: blue;<br /> }<br />
December 1, 2009 at 11:52#27466From CSS perspective a third table cell still matches TD+TD selector condition. However TD+TD+TD condition should have more weight in the case. We need to analyze that in depth, but it looks like a bug in our code.
December 4, 2009 at 16:31#27467We fixed the issue with CSS selectors. The updated version are going to be available for download next week.
December 8, 2009 at 22:05#27468are the updated versions available yet?
August 7, 2010 at 00:59#27469The beta release is planned for tomorrow (Dec. 11)
March 22, 2011 at 09:07#27470Pd4ML does support CSS selectors like “.tableclass td”.
Is this always true with the last version?
Do you have a reason to not include this feature in PD4ML?Thanks a lot for you answers.
March 22, 2011 at 11:58#27471We had no reason not to include it, so PD4ML does support the feature.
March 22, 2011 at 13:04#27472@PD4ML wrote:
We had no reason not to include it, so PD4ML does support the feature.
So it seems to be the same problem that the first post of this topic.
My CSS definition is the following:.ui-datatable .ui-datatable-data-empty td {
border-color:inherit;
border-width: 1px;
border-style: solid;
padding:4px 10px 4px 10px;
}It seems to be OK with PD4ML but it doesn’t work.
If I put the class directly in the HTML element, it works.Do you have any idea about this issue?
Thanks.
ClemiouMarch 22, 2011 at 13:46#27473Could you please also publish an HTML snippet, you want to apply the CSS to.
Also, to make sure the CSS selector does not work, try to temporarily add any obvious CSS property, like “color: red”.
March 22, 2011 at 14:00#27474@PD4ML wrote:
Could you please also publish an HTML snippet, you want to apply the CSS to.
Also, to make sure the CSS selector does not work, try to temporarily add any obvious CSS property, like “color: red”.
The HTML page, I want to apply the CSS to is generated by using JSF and Primefaces.
Here is an extract:
[language=html:3qakaise]
ANNU – LdapAdmin – V1.3 – 20 févr. 2011 – 4 bug(s)(1 de 1)
First
Prev
1
Next
Last
Identifiant Résumé Statut Ciblée Fixée Création MAJ 18950 Réinitialisation du mot de passe TW de certains comptes génériques hors-service résolu V1.3 V1.3 31 janv. 2011 2 mars 2011 19390 (1 de 1)
First
Prev
1
Next
Last
[/language:3qakaise]Moreover, I’m quite sure that the CSS is not applied because the cell border doesn’t appear.
March 22, 2011 at 14:14#27475In the HTML I see no any element of class ui-datatable-data-empty, so the selector always returns nothing.
If your concern is about borders of empty cells, it can be solved with
TABLE { empty-cells: show }
March 22, 2011 at 14:26#27476@PD4ML wrote:
In the HTML I see no any element of class ui-datatable-data-empty, so the selector always returns nothing.
If your concern is about borders of empty cells, it can be solved with
TABLE { empty-cells: show }
I made a mistake. The CSS part is the following:
[language=css:2u9e9msa].ui-datatable .ui-datatable-data td, .ui-datatable .ui-datatable-data-empty td{
border-color:inherit;
border-style:solid;
border-width:1px;
padding: 4px 10px;
}[/language:2u9e9msa]
With this one, it should work.March 22, 2011 at 14:40#27477PD4ML does not support
tag. It simply ignores it.
So TBODY.ui-datatable-data condition makes the selector to fail.
As a workaround I would recommend to remove .ui-datatable-data from there.[language=css:2o5v2soz].ui-datatable td, .ui-datatable .ui-datatable-data-empty td{
border-color:inherit;
border-style:solid;
border-width:1px;
padding: 4px 10px;
}[/language:2o5v2soz] -
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.