![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Sep 2010
Device: iPad
|
how to zero table cell spacing?
Hi, I'm converting HTML to EPUB with Calibre and am stumped on this.
I have this HTML: <table border="1" cellspacing="0" style="margin: 0; padding: 0;" cellpadding="0"><col style="width: 0pt; padding: 0; margin: 0;"><col style="width: 0pt; padding: 0; margin: 0;"><col style="padding: 0; margin: 0;"> <tbody style="margin: 0; padding: 0;><tr style="vertical-align: baseline; margin: 0; padding: 0" valign="baseline"><td style="padding: 0pt; margin: 0" align="right">x</td><td style="padding: 0pt; margin: 0" align="center">x</td><td style="padding: 0pt; margin: 0; word-break: keep-all; ">Advice or Analyses About Securities</td></tr></tbody></table> I have set cellspacing=0 on table, and have set CSS margin and padding to 0 on table, col, tbody, tr, and td. But the epub file seems to retain the typical browser default setting of '2'. I am viewing the epub with iBooks on iPad, Calibre, and the Firefox add-on, so I think the epub file is really that way. I have attached a photo of my iPad showing the result I am getting. How to zero out the space? I have border="1" for testing, but will have it set to 0 in the final effort. What I want is for the two empty, zero-width cells in columns 1 and 2 to have no effect on the positioning of the text in column 3. In HTML browsers, simpy setting celpadding=0 and cellspacing="0" is enough to get this effect. The HTML is output from a program, and I would rather not have to post-process it to remove the first two columns. Thanks, Gary |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use the border-collapse css property
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Sep 2010
Device: iPad
|
Thanks, just what I needed! I should have looked at Tables as well as Box Model in CSS-land.
- Gary |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Anyone know how to convert a pdf table into a table in Word or HTML? | BasilC | Workshop | 7 | 06-25-2010 01:02 AM |
Sideway Table in ePub (Rotate table/text) | Lapiz | ePub | 3 | 01-29-2010 01:11 PM |
Forget coffee table books-- how about a kitchen table book? | ardeegee | Lounge | 10 | 12-02-2009 12:00 PM |