05-02-2013, 12:28 PM | #16 |
Writer
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
Correction:
Sample 1 shows what I meant about shifting lines. But dgatwood is right when saying it's possible with steady margins. After trying several relations between font-size, line-height and margin-bottom I found this for the second example: .dropcap { display: block; float: left; font-size: 2.2em; font-weight: bold; line-height: 1.2em; margin-bottom: -0.2em; margin-top: 0em; width: 1em (better 1.1em for serifs) } This seems to be acceptable. Sorry for the confusion. George |
05-02-2013, 06:06 PM | #17 |
Wizard
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
The following class, it seems to work fine with any font-size:
.dropcap { float: left; font-size: 4em; font-weight: bold; margin-top: -0.2em; margin-bottom: -0.2em; margin-right: 5px; } The curious thing is that in Kindle Previewer looks ugly but in the devices (I have K4NT) looks great. |
Advert | |
|
05-04-2013, 09:48 AM | #18 |
Writer
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
@ RbnJrg: If you use the float style for an element you normally need a value for the width of this element. Perhaps the Kindle Previewer is missing it and the devices accept it?
And if this is right you don't need the margin-right attribute because this is defined by the width of it. George |
05-04-2013, 11:50 AM | #19 | |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
(@RbnJrg's style worked fine without any modifications.) Last edited by Doitsu; 05-04-2013 at 06:16 PM. |
|
05-04-2013, 04:23 PM | #20 |
Writer
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
The class in this example is .calibre1.
George |
Advert | |
|
05-04-2013, 06:23 PM | #21 |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
05-04-2013, 08:37 PM | #22 | |
Wizard
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
The main difference between your solution and mine is that while you use the property "width", I use the property "margin-right" (also I use a negative "margin-top"). Why am I using the property "margin" instead of "width"? Because -with the property "width"- the gap between the dropcap and the sorrounding text varies according with the dropcap letter. Is not the same if the letter is "I" or "E" or "M" o "W". By using the property margin-right (in pixels) that issue is not present. The following pictures shows better what I want to say. The first picture use your solution and the second picture, my solution. I know that "technically", with the property "float" the normal is to assign a "width" and you are proceeding according the rules. But with the .kf8 format it seems that with "dropcaps" is better not to assign a width. Best regards Rubén |
|
05-05-2013, 11:30 AM | #23 |
Writer
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
Hello Rubén,
you are right. I have copied some of your features, modified the sizes and now it looks fine. Thank you. George |
05-05-2013, 03:00 PM | #24 |
Wizard
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
05-06-2013, 03:18 AM | #25 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
Hey, some good discussion has been happening while my back was turned!
Thank you to everybody who has been posting, I'm learning some very good tricks. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Total noob needs help moving books Kobo to Kindle | diosaclo | Amazon Kindle | 2 | 11-28-2011 03:54 AM |
Noob help Rtf to Mobi has hyphens at every syllable | muddog23 | Calibre | 3 | 05-17-2010 09:13 PM |
Hacks Kindle noob... purchased books can't open with Kindle | Riptide | Amazon Kindle | 16 | 10-13-2009 07:30 PM |
Mobi vs. ePub... kind of a noob question sorry.. | jessTay | ePub | 8 | 05-21-2009 11:16 AM |
preparing scanned books before PDF-ing | sputnik | Reading and Management | 2 | 06-09-2008 02:00 AM |