Copy link to clipboard
Copied
I am using tables within InDesign to format the output for ePub since spaces and tabs are not supported.
When I am working in InDesign, I set the table to have no border, no cell stroke, basically no lines whatsoever. I simply want to use the table as a method of placement.
When I export to ePub everything goes well except every table has a border and the cells are all stroked. How can I create a table for ePub that has no lines whatsoever? All I can think of is using some sort of custom CSS on export.
Does anyone have a solution or workaround that they would be willing to share?
Probably, yes. iBooks is generally good but has a healthy helping of Apple's "we know better" features. Another test is to use Kindle Previewer, which while nonstandard in its own ways can be a reliable overall proof.
You can also use the big CSS hammer: add !important after the two no-border statements:
border: none !important;
EPUB readers, for good and bad, tend to be very stubborn and follow their base/default encoding against all instructions to the contrary. A lot of this comes from
...Copy link to clipboard
Copied
If you're creating reflowable ePubs, you're going to find that tables are portrayed as tables — minimal, but absolute formatting.
Remember that you're essentially creating a packaged website with HTML5 and CSS3 when you're building an ePub. If you're good at hand-coding or using a dedicated ePub editor like Calibre, you have more flexibility for formatting than you'll ever get from InDesign. There are other ePub editors, but I personally recommend Calibre highly. And you can't beat the price, though contributions are gratefully accepted.
Your take that you need to tailor your CSS properties after export is the right one. If you're looking for something snazzy for your ePub, it's best to consider InDesign as a great tool for developing a relatively robust first draft. Fast, but fine-tuning may be necessary.
Hope this helps,
Randy
Copy link to clipboard
Copied
It is very difficult to get predictable or consistent results for tables in EPUB export except by using CSS. However, if you use CSS, you can make table formatting jump through hoops... not the least because ID exports no values equivalent to 'padding,' but you can use padding statements in CSS.
FWIW, here are two basic CSS elements for no-line tables:
table.NoLine-Table {
width: 100%;
border: none;
margin-top: 30px;
margin-bottom: 30px;
padding-bottom: 30px;
}
td.NoLine-Table {
border: none;
padding: 0;
epub-hyphens: none;
}
Copy link to clipboard
Copied
Thanks you for the code. Stupid question, I understand what it does, but do I throw it into a text file with a .css extension and then add it to the export screen?
Copy link to clipboard
Copied
Basically. Your CSS goes in a plain text file, then in the Export menu, you add it to the "Additional CSS" list. You can keep adding code to it infinitely.
The name of the definition has to match your Table Style name. So either change the code to table.MyTableName etc., or change your no-line table style name to Noline-Table (or NoLine Table... the hyphen is automatic in ID's CSS) But the orthography has to be perfect — Noline Table and noline table and NoLine Table are not the same definitions.
Copy link to clipboard
Copied
James, I'm getting inconsistent results. In Calibre the grid lines are gone, but the same ePub in iBooks displays the grid lines. Is this to be chocked up to "devices" rendering?
Copy link to clipboard
Copied
Probably, yes. iBooks is generally good but has a healthy helping of Apple's "we know better" features. Another test is to use Kindle Previewer, which while nonstandard in its own ways can be a reliable overall proof.
You can also use the big CSS hammer: add !important after the two no-border statements:
border: none !important;
EPUB readers, for good and bad, tend to be very stubborn and follow their base/default encoding against all instructions to the contrary. A lot of this comes from code that is supposed to fix and bypass bad conversions... so it can be frustrating to try and get "delicate" nonstandard rendering.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now