![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Assistance with tables in Sigil
Most of the stuf I do is pretty streight forward, but now I think I have to use a table to keep things arranged.
I did a simple 3x3 test (attached) and css picked up from cssschools.com, but I'm missing something What I'd like ... 1. entire table centered on page, with maybe 10% margins left and right 2. 3px solid bottom border below header row 3. 1px dotted border between each data row 4. some way to specify the width (by percent??) for each of the columns, 25%, 25%. 50% Code:
/* applies to entire table */ table { border:3px solid black; text-align: left; margin-left:10%; margin-right:10%; margin-top:1em; margin-bottom: 0em; } /* applies to just the first = header row */ th { font-style:italic; bottom-border:1px solid black; height:3em; vertical-align:center; text-align:center; padding:5px; } /* applies to each row */ tr { margin-top:1em; margin-bottom: 1em; height:2em; vertical-align:top; } /* applies to data cells */ td { padding:5px; } Thanks Paul |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
table { width: 90%; margin-left: 5%; text-align: center; border: 3px solid black; border-collapse: collapse; } th { font-style: italic; height: 3em; vertical-align: middle; padding: 5px; border-bottom: 3px solid black; background-color: #8fbc8f; } tr { margin-top: 1em; margin-bottom: 1em; height: 2em; } tr:nth-child(even) { /* this selector doesn't work in ADE */ background-color: #BDE1BD; } tr:nth-child(odd) { /* this selector doesn't work in ADE */ background-color: #F0FFF0; } td { padding: 5px; border-bottom: 1px solid black; } td.first, td.second { width: 25%; /* width of the first and second columns */ } td.third { width: 50%; /* width of the third column */ } Code:
<table> <thead> <tr> <th colspan="3">FIRST ROW</th> </tr> </thead> <tbody> <tr> <td class="first">1</td> <td class="second">2</td> <td class="third">3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> <tr> <td>10</td> <td>11</td> <td>12</td> </tr> </tbody> </table> Regards Rubén Last edited by RbnJrg; 08-03-2013 at 06:12 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
WOW -- thanks
There's a lot to review Some CSS I understand, but there's a number that will have me looking in cssschools.com Thanks again Paul |
![]() |
![]() |
![]() |
#4 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Isn't that a Kindle4? A K8 device, in other words? If you try to use that for a K7 mobi, what happens, or do you use an image of the table instead as a fallback for K7? Hitch |
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Yes! that is K4NT ![]() But it seems to me that in this case Paul doesn't want to use the tables in a Kindle device because he posted in the Sigil section of this forum; if he would want to use the tables for Kindle he would have posted in the "Kindle Formats" section (but of course, I may be wrong ![]() Regards Rubén |
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Hmmm - I was targeting towards a file for the Kindle Touch (run the epub through KindleGen). Sometimes I'll put the epub on my iPad, although I typically prefer the small and lighter form factor ofthe Kindle.
I was really only trying to keep some numerical data aligned in a grid I have not even gotten to the point of seeing what the tables will look like on the KT, since I'm still trying to learn enough CSS and HTML to format them with Sigil. Does this mean that some CSS shouldn't be used for KT compatibility? Paul Paul |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
![]() Save the image as a *.gif file and replace the table with the image. Shows fine in all formats and devices. I do this with all tables no matter how complex. P.S. The gif format seems to diaplay character data better than other formats. Last edited by crutledge; 08-04-2013 at 12:59 PM. |
|
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
I think we're now just about at the point where simple tables are acceptable in general-distribution eBooks - we can't go on supporting obsolete products for ever. But if you're thinking of publishing, note that Smashwords will reject out of hand books that use tables. And if you're doing it for money, a client will have little problem in finding a platform that gives an unsatisfactory rendition - some of them delight in doing this :-)
|
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Thank you for the code RbnJrg. Code for tables is definitely an area where I am sorely lacking. Would be great if people could post samples of tables that look good in old MOBI as well. That may or may not help many lurkers who never post in topics but learn a lot (ok ok, and me too!).
![]() Quote:
For the love of all that is holy, DO NOT save tables/charts as JPG though (one of my huge pet peeves). See my post here for some comparisons: https://www.mobileread.com/forums/sho...5&postcount=26 |
|
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
If you are going to use few tables, then using images is not an important matter and what you do is a very good solution ![]() But when tables are many, then the book becomes heavier when we use images instead of table code. Besides, if you want to make some changes in the data tables, it's easier when your work with table code and not with images. As you see, by using images we have advantages but also disadvantages ![]() |
|
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
You are welcome
![]() Quote:
1. For .kf8 to use css and html code. 2. For mobi7 (Kindle1 and Kindle2), to use images. That is because if we use tables for Kindle2, Kindle1 won't read them. Regards Rubén |
|
![]() |
![]() |
![]() |
#14 | |
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#15 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Well, one solution is to simply have the author (assuming we're not talking about PD books which need to stay essentially "as-are") reformat the tables. Not every table has to be a table. Tabular data is put in that format because, on paper or in print, it makes sense. But there's really no reason that your standard, x-y table can't be redone into a lot of smaller tables, so that each smaller table has the column header as its title, and the row indicia or names repeated in a left-most column, and the data in the next column to the right. So if you had 10 original columns, now you have 10 tables. This smaller "footprint" works fine in 90-95% of the readers out there, as a table.
I think most bookmakers are deluding themselves about the readability of imaged-tables in e-readers. This isn't directed at you, Charlie, not at all, but in truth, most of them look utter crap on a small-screen device, and zooming them certainly doesn't help. Just my $.02 on the topic. I concur that there's certainly no magic bullet solution. Hitch |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pleading for assistance! | camperbc | Sony Reader Dev Corner | 20 | 02-22-2012 09:40 AM |
Assistance with look of conversion... | Bev M | Kindle Formats | 2 | 10-31-2010 11:06 AM |
Can I ask for your assistance? | Alphapheemail | Writers' Corner | 50 | 06-13-2009 12:59 AM |