Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-21-2010, 01:13 PM   #1
garygrosso
Junior Member
garygrosso began at the beginning.
 
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
Attached Thumbnails
Click image for larger version

Name:	cellspacing.jpg
Views:	98
Size:	233.2 KB
ID:	60032  
garygrosso is offline   Reply With Quote
Old 10-21-2010, 01:32 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,283
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the border-collapse css property
kovidgoyal is offline   Reply With Quote
Old 10-21-2010, 03:49 PM   #3
garygrosso
Junior Member
garygrosso began at the beginning.
 
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
garygrosso is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 09:06 AM.


MobileRead.com is a privately owned, operated and funded community.