Hi folks, I'm wrestling with an invoice advanced P...
# suiteflow
c
Hi folks, I'm wrestling with an invoice advanced PDF template. I have several tables and within the tables I'm using colspan to control the right/left location of <td>s. One table is in the header and the other two are in the body. I want to line some of the <td>s up vertically with each other on the page (i.e have the header label & inv# stacked directly above a list in the first body table with customer info and above the Ship To). All 3 have the same "total" colspans across all <td>s in the table, but I can't get consistent location from one table to another... Any tips for getting elements in different tables to line up with one another?
s
You may want to try asking in the #C466X49JB channel. I will say, high level, colspan can be misleading. Within the same table, they can be useful for elements that have to literally span multiple columns, but when dealign with multiple tables, the columns, and therefore colspans, won’t always match unless you also ensure that the columns themselves are the exact same width and start at the same position. The best advice I can give, assuming all of the tables are the same width, is to use percentage based column widths or some other width definition that is more controlled. You can still use colspan and rowspan, the trick is getting the columns to be consistent across all tables. By default, columns are sized dynamically base don content, which doesn’t work well if you want things to line up nicely. To set the column widths, just do it in the first row or header row, of td elements. You don’t have to repeat it for every other row.
👍🏻 1