Alternate row colour

February 18, 2022 03:41:48
Topics: 3
Messages: 7
Hi!

Trying to create a table with alternate row colour, but when I use this code in the CSS section of the HTML element, it doesn't work:

tr:nth-child(even) {background-color: #f2f2f2;}

Any idea ?

Thank you,

Stephane
February 18, 2022 06:22:50
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

Unfortunately E2Pdf currently doesn't support pseudo classes. We are continuously working on extending "HTML" support however currently it's not available.

The only way is to add class to "tr" some class and add to CSS section:

.class {background-color: #f2f2f2;}

However, as we understand you are using "preg_replace_filter" which will not be possible to make it compatible with as it can be removed rows which going 1 by 1. Unfortunately there is no any ETA when pseudo classes will be supported.

If it will be any changes in its support we will update current thread. Sorry for the inconvenience.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
February 18, 2022 07:13:28
Topics: 3
Messages: 7
Understood. We will find another design trick ;)

Thanks again for your quick and great support !

Best.

S.
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.