02-15-2012, 11:26 PM | #1 |
Zealot
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
Tables in ePub: CSS
I'm exploring the possibilities of formatting tables with CSS/XHTML. I'm sure there will be a few questions as I go, but right now I'm wondering:
Can you control the length of a particular column? I'd like 'column one' to be 75%, and 'column two' to be 25% of the page width. |
02-15-2012, 11:55 PM | #2 |
Zealot
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
Second question: Is it possible to ensure table stays on one page? They look terrible when split over two pages.
|
02-16-2012, 02:52 AM | #3 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It is quite easy to fix the width of a column to a fixed percentage. If it only two columns, you only need to specify one.
Code:
.colw { width: 75%; } Code:
<table width=100%> <tr> <td class="colw">75%</td> <td>the rest...</td> </tr> </table> Last edited by Toxaris; 02-16-2012 at 02:58 AM. |
02-16-2012, 08:13 PM | #4 |
Zealot
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
Thanks for the helpful tips Toxaris. Good point re zoomlevels vs pagebreaks.
|
02-23-2012, 11:07 AM | #5 |
Enthusiast
Posts: 29
Karma: 22
Join Date: Oct 2010
Location: London
Device: Kindle, iPad, iPhone 4, HTC Desire
|
I would recommend dropping the font size to keep it on one page, looks much better on the kindle
|
02-23-2012, 02:51 PM | #6 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
Anyway, fontsize is a little tricky. There are different sizes of readers with different resolutions, so which fontsize to choose? Also, some people want to enlarge the font so they are able to read it. That will definitely break your page. I really dislike fixed fontsizes. |
|
Tags |
css, epub, indesign, tables |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
ePub to Mobi issues with tables | apastuszak | Conversion | 11 | 06-20-2011 09:19 PM |
HTML tables truncating after converting to epub | SEI Publications | Conversion | 7 | 05-06-2011 06:53 PM |
Classic Nook Crashes on Loading Tables in Converted EPUB | nulall | Barnes & Noble NOOK | 3 | 02-01-2011 07:58 AM |
Converting Word Doc with Tables to Epub? | dhume01 | ePub | 8 | 12-28-2010 08:02 PM |