Is it possible to do zebra tables in an invoice pd...
# advancedpdf
p
Is it possible to do zebra tables in an invoice pdf for the items? I tried the standard css code below but nothing changed:
Copy code
tr:nth-child(even) {
  background-color: #f2f2f2;
}
m
BFO only supports limited CSS2. You can check the loop index in freemarker and change the style accordingly. There are a couple handy loop builtins for that. https://freemarker.apache.org/docs/ref_builtins_loop_var.html
👍 2
s
Yeah, CSS pseudo-classes and other fancy CSS features are not supported by BFO. I tried the same thing a while ago and found out it doesn’t work. SA article 26489 gives NetSuite’s recommended approach for doing this using the modulo operator: https://netsuite.custhelp.com/app/answers/detail/a_id/26489
j
@michoel I just tried this out, so good! thank you