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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-13-2012, 11:40 AM   #1
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
CSS / dropcaps

Comment from an earlier thread:


Quote:
Originally Posted by theducks View Post
There is no reason a simple book should have more than 10 styles.
Body
cover style
titlepage style
Chapter title block style
First Paragraph (optional), dropcap (optional)
regular paragraphs (can be default body stle. so redundent
scene break style
fine-print style (copyright, raves)
Where can I go to see a sample CSS that would cover some or all of these items? For example, dropcaps. Here is a start of a chapter:

<p class="flush"><span class=dropcaps>I</span> began

And here is the CSS for dropcaps:

}
span.dropcaps {
float: left;
font-size: 3em;
margin-bottom: -0.3em;
margin-top: -0.3em;
}


Alas, both the e-ink Kindle (which supposedly doesn't support KF8 standard) and the Kindle Fire (which supposedly does) render the dropcap exactly the same. The large letter "I" appears on a line by itself, followed by the rest of that opening sentence, beginning with "began". I don't know whether this is a flaw in my CSS or in the KF8 instructions/standard.

(I was pleased to see that the "flush" CSS worked as expected.... Or could my result come from the combination of float: left and flush?)
Oldpilot is offline   Reply With Quote
Old 01-13-2012, 12:21 PM   #2
WS64
WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.
 
WS64's Avatar
 
Posts: 660
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
Try somthing like this:
<p class="first">I began...</p>
<p>normal text</p>

With this css:
.first:first-letter {font-size:175%;}
WS64 is offline   Reply With Quote
Advert
Old 01-13-2012, 03:58 PM   #3
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
Thanks, but no joy. The Kindles just ignore that. Evidently only the dropcap language as I gave it is allowed. Probably I futzed up the CSS somehow.

“Normal” text must use the default font size. The <font size=”…”> tag or its equivalent in CSS should not be used in “normal” text.
Oldpilot is offline   Reply With Quote
Old 01-13-2012, 04:00 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Mobipocket ignores a lot of things ePub supports like true blockquotes.
JSWolf is online now   Reply With Quote
Old 01-13-2012, 04:29 PM   #5
WS64
WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.
 
WS64's Avatar
 
Posts: 660
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
Quote:
Originally Posted by Oldpilot View Post
Thanks, but no joy. The Kindles just ignore that.
No, he doesn't.
It looks like this:


Maybe you use not the right tool to convert to mobi? I use calibre.

Source looks like this:
<body>
<h4 id="heading_id_2">16.</h4>

<p class="center"><img alt="-----" height="12" src="../Images/hr.gif" width="100%" /></p>

<p class="first">»Kurzmeldung, Mr. Courtenay«, sagte die Stimme meiner Sekretärin. Ich drückte auf den Knopf. »Natschu in Albany auf Denunzierung des Nachbarn festgenommen. Soll ich ihn auf die Liste setzen?«</p>

<p>»Verdammt noch mal!« explodierte ich. »Wie oft soll ich Ihnen grundsätzliche Anweisungen wiederholen? Natürlich kommt er auf die Liste. Warum zum Teufel nicht?«</p>
WS64 is offline   Reply With Quote
Advert
Old 01-13-2012, 04:56 PM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
But - and forgive me for pointing this out - that's not a drop cap. A drop cap is when the initial letter extends downwards, not upwards.
HarryT is offline   Reply With Quote
Old 01-13-2012, 05:36 PM   #7
WS64
WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.
 
WS64's Avatar
 
Posts: 660
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
Ah, okay, I did not know THAT was the main point here.
In this case the "float: left;" is the culprit, and yes, unfortunately, this seems not to be supported by mobi.
WS64 is offline   Reply With Quote
Old 01-16-2012, 06:09 AM   #8
huebi
Zealot
huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!
 
Posts: 121
Karma: 5070
Join Date: Dec 2010
Device: none
Quote:
Originally Posted by WS64 View Post
Try somthing like this:
<p class="first">I began...</p>
<p>normal text</p>

With this css:
.first:first-letter {font-size:175%;}
pseudo-classes should not be used in XHTML for ePubs.
huebi is offline   Reply With Quote
Old 01-18-2012, 05:05 AM   #9
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by HarryT View Post
But - and forgive me for pointing this out - that's not a drop cap. A drop cap is when the initial letter extends downwards, not upwards.
Yes, that image is neither a dropcap nor a BFL (Big First Letter), which is an enlarged letter which is encapsulated in a "box" of white around it, usually extending 3 lines downward. That is a "Calibre Special," as I call it, genuinely called a "Raised Initial," and it's usually the result of nothing more than a span setting the fontsize to 1.5 or 2; in some cases (rare) to 2.5 or 3 ems. Nothing more. Calibre does this routinely when it encounters anything it construes as an attempt at a dropcap. That's not magic--it's simply Calibre.

Stupid question, but, to the OP: when did you try to generate this, using that dropcap span, and is the only result you obtained a Raised Initial? Is that correct? And did you use KG or Previewer, and I presume, since this is the SIGIL forum, and not the KINDLE or MOBI forum, nor the ePUB forum, that you used an ePUB you made in Sigil? Which you then fed to...what, KG? Or previewer, or...?


Hitch
Hitch is offline   Reply With Quote
Old 01-19-2012, 12:04 AM   #10
StevenLin
Member
StevenLin began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2011
Device: none
This is what I did in the CSS:

span.dropcap {float: left; font-size: 4.7em; line-height: 0.8em; margin-right: 3pt; margin-bottom: -0.1em;}

It sure works on my computer.
StevenLin is offline   Reply With Quote
Old 01-19-2012, 03:44 AM   #11
WS64
WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.
 
WS64's Avatar
 
Posts: 660
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
But "float: left" does not work in mobi (at least not on my Kindle by conversion from epub with Calibre)
WS64 is offline   Reply With Quote
Old 01-20-2012, 07:28 AM   #12
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by WS64 View Post
But "float: left" does not work in mobi (at least not on my Kindle by conversion from epub with Calibre)
We know that drop-caps don't work in Mobi. That's not what's being discussed here.
HarryT is offline   Reply With Quote
Old 01-20-2012, 04:46 PM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by HarryT View Post
We know that drop-caps don't work in Mobi. That's not what's being discussed here.
If you read the first post, you'll see this is exactly what we are discussing here.
JSWolf is online now   Reply With Quote
Old 01-20-2012, 04:50 PM   #14
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by JSWolf View Post
If you read the first post, you'll see this is exactly what we are discussing here.
But we DO know that drop-caps don't work in Mobi, because Mobi doesn't support "float".
HarryT is offline   Reply With Quote
Old 01-20-2012, 04:58 PM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by HarryT View Post
But we DO know that drop-caps don't work in Mobi, because Mobi doesn't support "float".
I know and I know you know. But not everybody knows or this thread would not exist.
JSWolf is online now   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
Override ePub CSS with userStyle.css? barium Sony Reader Dev Corner 11 07-16-2011 03:25 PM
epub CSS versus "Regular" CSS konrad ePub 4 02-18-2011 09:29 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM
help with css bobcdy ePub 2 02-13-2010 11:59 AM
Dropcaps example in User Manual FAQ jackie_w Calibre 7 10-28-2009 06:52 AM


All times are GMT -4. The time now is 11:56 AM.


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