![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
|
Raised Drop Cap Image Followed by Small Caps
EDIT: I figured it out! https://www.mobileread.com/forums/sho...54&postcount=7
I have what appears to be a very specific problem in creating my ePub. I've been wrestling with it all day, and I can't find a solution. I've managed to get them to float left as a drop cap, but the formatting gets wonky so I'd rather keep them raised. I'm attempting to use images as raised drop caps followed by small caps, but no matter what I do I get a line break following the image. I was able to get it to work in my mobi, but I can't get it to work across ePub devices (I'm testing on the iPhone) (edit: specifically in iBooks). I've tried using different classes and a million other solutions, and I'm out of ideas. Here's the relevant css: Code:
.scrivener15 { font-variant: small-caps } .dropfix { float:none; width: 25%; } Code:
<div class="dropfix"><img alt=" " src="../Images/o-drop-cap-quote.gif" width="100%" /></div> <p class="scrivener15">f course it’s going to hurt.”</p> Any help would be very appreciated. I guess I can experiment with removing the small caps, but I'd like to keep them if possible. Thanks! Last edited by RyanMcSwain; 09-01-2014 at 01:38 AM. Reason: Specify which app I'm testing with |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,660
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
https://www.mobileread.com/forums/sho...8&postcount=20 https://www.mobileread.com/forums/sho...51&postcount=9 https://www.mobileread.com/forums/sho...28&postcount=9 Regards Rubén |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,364
Karma: 78877538
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Also, before others point this out, saying that you have problems on an iPhone is meaningless. Realize there are MANY eReader programs available for the Apple iDevices, each of which have so own idiosyncrasies.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
|
You're right, of course, and I apologize. I'm specifically testing on iBooks, as I understand it's one of the most picky. I'm not having problems with other previewers.
|
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,385
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If this is something you are doing for just yourself, I suggest you stop using iBooks and switch to Marvin or Bluefire Reader and you'll find both do work that much better then iBooks.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
|
Quote:
I'm trying to use variable sizes so the raised drop caps looks good on different screens. My problem is that in order to use percentage widths I can't use inline css classes. That means I'm forced into a line break after the image. I'm probably missing something obvious. Is there a way to make float:none work inside an ePub with a percentage width? |
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
|
Looks like I finally figured it out! I was definitely missing the obvious.
Code:
.scrivener15 { font-variant: small-caps } .dropfix { display: inline; width: auto; height: 4em; } <p class="scrivener15"><img class="dropfix" alt="“O" src="../Images/HIGH-QUALITY-drop-cap-quote.gif" /><span>f course it’s going to hurt.”</span></p> |
![]() |
![]() |
![]() |
#8 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,385
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Then here's what you'll have to do. You'll have to make one version for iBooks and one version for everything else. iBooks is an oddity unto itself and you do have to code differently there (not always, but a good portion of the time).
For example, font-variant: small-caps will not work with ADE based Readers/apps. So you either have to embed a font with a true small-cap font or fake it in the CSS like most publishers do. |
![]() |
![]() |
![]() |
#9 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
|
Quote:
Thanks again to everyone for weighing in. |
|
![]() |
![]() |
![]() |
#10 | |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
Code:
-webkit-line-box-contain: block inline replaced !important; |
|
![]() |
![]() |
![]() |
#11 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,385
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Last edited by JSWolf; 09-04-2014 at 10:15 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
KF8 and raised cap | mandy314 | Kindle Formats | 15 | 04-21-2014 08:10 PM |
Drop cap bug on Paperwhite | dgatwood | Kindle Formats | 11 | 04-10-2014 04:14 AM |
Aura HD Drop Cap coding help, please | MacEachaidh | Kobo Reader | 13 | 08-15-2013 01:18 PM |
Inexplicable small cap formatting | John123 | Workshop | 4 | 01-16-2013 08:33 AM |
Using CSS in Word to make a Drop Cap work in an Epub | brewt | ePub | 3 | 01-31-2009 06:00 PM |