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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2012, 11:26 PM   #1
virtual_ink
Zealot
virtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheese
 
virtual_ink's Avatar
 
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.
virtual_ink is offline   Reply With Quote
Old 02-15-2012, 11:55 PM   #2
virtual_ink
Zealot
virtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheese
 
virtual_ink's Avatar
 
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.
virtual_ink is offline   Reply With Quote
 
Enthusiast
Old 02-16-2012, 02:52 AM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,908
Karma: 2909045
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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%;
}
and in HTML:
Code:
<table width=100%>
<tr>
<td class="colw">75%</td>
<td>the rest...</td>
</tr>
</table>
Keeping the table on one page is difficult. You could try something with page-break-avoid, but than it must fit on a page. With the different zoomlevels, that is hard to control.

Last edited by Toxaris; 02-16-2012 at 02:58 AM.
Toxaris is offline   Reply With Quote
Old 02-16-2012, 08:13 PM   #4
virtual_ink
Zealot
virtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheese
 
virtual_ink's Avatar
 
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.
virtual_ink is offline   Reply With Quote
Old 02-23-2012, 11:07 AM   #5
KLUTCH
Enthusiast
KLUTCH began at the beginning.
 
KLUTCH's Avatar
 
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
KLUTCH is offline   Reply With Quote
Old 02-23-2012, 02:51 PM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,908
Karma: 2909045
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Quote:
Originally Posted by KLUTCH View Post
I would recommend dropping the font size to keep it on one page, looks much better on the kindle
Since Kindle does not support ePUB, that is not a real issue.

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.
Toxaris is offline   Reply With Quote
Reply

Tags
css, epub, indesign, tables

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 10:58 PM.


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