![]() |
#106 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I've not seen any use of page-template (yet) that could not be done in CSS. |
|
![]() |
![]() |
![]() |
#107 | ||
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
![]() Wouldn't it just be easier to edit the page-template to make it "empty"? That way you don't need to remove every reference to it. I don't know if a truly empty file would work, but something like this probably would: Code:
<ade:template xmlns="http://www.w3.org/1999/xhtml" xmlns:ade="http://ns.adobe.com/2006/ade" xmlns:fo="http://www.w3.org/1999/XSL/Format"> </ade:template> Quote:
|
||
![]() |
![]() |
![]() |
#108 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 435
Karma: 24326
Join Date: Jun 2010
Device: Kobo
|
Pretty Chapter Heading
I won't claim to have thought this up myself. It draws a nice box around the header, with a big number and a subtitle for the chapter:
Code:
.chapterHeader { height:60px; border:1px solid #000; display:block; margin-bottom:20px; background-color:#FFF;} .chapterHeader .translation { float:left; font-weight: normal; margin-top:38px; margin-left: -8px; margin-bottom: 0px; padding-right: 16px; padding-left: 5px ; padding-bottom: 0px; padding-top: 0px; font-size:26px; background-color:#FFF;} .chapterHeader .count { line-height: 100%; font-style:normal; font-weight: normal; text-transform:uppercase; font-size:94px; margin-right:18px; margin-top:-14px; margin-bottom: -20px; float:left; padding:0px; background-color:#FFF;} Code:
<div class="body chapter" id="chapter"> <h2 id="heading_id_2"><span class="chapterHeader"><span class="translation">Chapter</span> <span class="count">1</span></span> Chapter Subtitle</h2> |
![]() |
![]() |
![]() |
#109 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 92
Karma: 50000
Join Date: Oct 2009
Device: none
|
Hey! It's me again.. This time problems with centering a table. How can I center my table easily and simply? I tried using:
Code:
table.center { margin-left:auto; margin-right:auto; } |
![]() |
![]() |
![]() |
#110 |
Chocolate Grasshopper ...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,599
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
could be epubs are not designed for tables ....
![]() |
![]() |
![]() |
![]() |
#111 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
That's the way, but ADE just doesn't support "auto" margins
![]() |
![]() |
![]() |
![]() |
#112 |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
|
![]() |
![]() |
![]() |
#113 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 339490
Join Date: May 2010
Device: nook, BlackBerry
|
Unfortunately, the standard allows this behaviour, which is one of the differences between OPS and XHTML/CSS. The standard reads "Reading Systems may set the value of any margin property whose specified value is auto to 0." See footnote 1 in section 3.3.
![]() You can get around it by putting your content inside a table block that has been centred. See this thread for some work-arounds. Last edited by EricDP; 10-06-2010 at 09:55 AM. |
![]() |
![]() |
![]() |
#114 |
speaking for myself
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
|
|
![]() |
![]() |
![]() |
#115 |
speaking for myself
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
|
It is certainly not a good idea to use page template just for margins. These should be specified using regular margins on body and @page rule.
|
![]() |
![]() |
![]() |
#116 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 339490
Join Date: May 2010
Device: nook, BlackBerry
|
Quote:
Why can't publishers realize that their trade-paperback edition and hardcover edition margins just don't work on a 6" screen? Doesn't anybody proof these books on an actual reading device? |
|
![]() |
![]() |
![]() |
#117 | ||
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
Quote:
![]() Centering simple tables (like the TOC in many Project Gutenberg books) should be provided for, and I know workarounds can be used to properly center images, while centering headings using <h1> and similar constructs has always worked like a charm! ![]() When the device's width is known, then centering should just be an algebraic exercise when you know the "extent" (max.) width of the table and/or image. Though I can understand that tables can be arbitrarily complex and not yield it's extent width easily, simple tables should be rendered centered if so specified... ![]() Last edited by nrapallo; 10-13-2010 at 01:49 PM. |
||
![]() |
![]() |
![]() |
#118 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 339490
Join Date: May 2010
Device: nook, BlackBerry
|
Tables can be centered, you just need to make them 'inline'. Make a div with 'text-align: center'. Make your table 'display: inline-table' and it will be centered as if it were text. The only problem is, as an inline element, it can't break across pages - the entire table is treated as a single character of text.
|
![]() |
![]() |
![]() |
#119 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
![]() ![]() ![]() Last edited by nrapallo; 02-22-2011 at 02:09 PM. |
|
![]() |
![]() |
![]() |
#120 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
Oh, that's a big problem with lengthy TOC or List of Illustrations found in some PG ebooks, like Etext #28700 that I have uploaded before to my GuteBook thread. I re-generated the .epub version and attached it below, this time inserting your suggested code, namely: Code:
table { display: inline-table; } /* work around for ADE centering with CSS problem */ ![]() Any better solutions... ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
direkter Umlaut oder lieber HTML Code in Epub ? | NASCARaddicted | Erste Hilfe | 14 | 06-16-2011 05:54 AM |
Programming language code snippets in ebooks? | Connochaetes | Writers' Corner | 7 | 10-18-2010 02:43 PM |
ebook-convert HTML to EPUB and problem with <pre><code> | mikegr | Calibre | 2 | 03-09-2010 02:27 PM |
css override code for margins? | Amalthia | Calibre | 15 | 08-11-2009 07:20 PM |
Problems generating ePub from HTML/CSS | AlexBell | Calibre | 3 | 07-17-2009 05:10 AM |