10-17-2012, 07:23 PM | #1 |
Member
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
|
Can I capitalize a letter?
How do I get my CSS to do that?
— Where is God? |
10-17-2012, 08:00 PM | #2 |
Well trained by Cats
Posts: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
10-17-2012, 08:08 PM | #3 |
Grand Sorcerer
Posts: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You seriously need to check out some CSS/xhtml/ePub tutorials. This really isn't the right place for "How do I make the first letter big?" type questions.
Spoiler:
|
10-17-2012, 08:56 PM | #4 |
Member
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
|
Thanks, theducks.
|
10-17-2012, 09:11 PM | #5 |
Well trained by Cats
Posts: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
10-18-2012, 07:39 AM | #6 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
When you start doing this sort of changing of letter size, etc, be sure to keep an eye on how it will look in your target device. Some css can unexpectedly cause text to disappear by being shoved off the right side of screen.
You might take a look at Three Men in a Boat, which is available in the MR library. It is full of fancy formatting that works. Glance through it in Book View and when you see something that you like, switch to Code View and see how it is done. |
10-18-2012, 09:58 AM | #7 | |
Wizard
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
Quote:
Also check out W3schools' CSS tutorials. While ePub doesn't support everything in CSS it does support a goodly portion of it. BTW, you might find that you also need to add a font-weight attribute to the CSS suggested by theducks in order to get the effect you illustrate .bigletter {font-size: 175%; font-weight: bold;} Last edited by dwig; 10-18-2012 at 10:02 AM. |
|
10-18-2012, 10:24 AM | #8 | |
Well trained by Cats
Posts: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I started a (Mostly Chapter heading, first paragraph coding) snippet sampler book of the things I like or just tried out . 1 page per thing each page can have its own stylesheet This way, you also get to try it on the target device |
|
10-18-2012, 11:32 AM | #9 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
I would add to the above suggestions that it's more normal to use a drop-cap than a raised-cap for the first line of a chapter.
|
11-04-2012, 11:07 AM | #10 |
Member
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
|
OK... now I'm trying to do something a little bit different. I'm almost there, but I'm still missing something.
I want my first paragraph to look like this... but it's like this... The second letter is idented and I think the text is not justified. Here's the code. <p class="p"><span class="firstletter">S</span>e parasse de correr, estaria morto. Meus pulmões ardiam, o coração bombeando ácido, cada músculo do meu corpo ameaçava explodir. Não conseguia mais sequer ver para onde ia, a visão enfraquecendo, enquanto meu corpo se preparava para desistir. Se a sirene não martelasse em meus tímpanos, teria conseguido escutar minha respiração, furiosa e desesperada, incapaz de aspirar ar suficiente para seguir adiante.</p> <p>Apenas mais um lance de escada, mais um, e talvez conseguisse.</p> And here's the class: .firstletter{ font-family:"Adler"; font-size:4em; float: left; margin: -0.1em 0.1em -0.4em -0.2em; text-ident:1em; } |
11-04-2012, 12:28 PM | #11 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Did you remove indent from the first paragraph?
Code:
p.p { text-indent: 0; } |
11-04-2012, 01:10 PM | #12 |
Member
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
|
Thank you, Jellby.
|
11-05-2012, 12:25 AM | #13 |
Enthusiast
Posts: 49
Karma: 475062
Join Date: Aug 2012
Device: nook simple touch
|
http://john.nachtimwald.com/category...rmatting-tips/
Here is some EPUB formatting tips, it can help you to make epub visually appealing. |
11-14-2012, 10:30 PM | #14 | |
Resident Curmudgeon
Posts: 73,876
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
span.ri { font-size: 4em; font-weight: bold; } Code:
span.ri { font-size: 4em; font-weight: bold; line-height: 0 } |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unutterably Silly Change a Letter | DrDln | Lounge | 451 | 10-23-2012 04:49 PM |
The Dutch letter 'IJ'. | mbovenka | Library Management | 9 | 12-29-2011 03:21 AM |
How not to capitalize titles from meta data? | rogue_librarian | Library Management | 14 | 12-10-2011 08:31 PM |
Capitalize Authors Names | iridius | Library Management | 7 | 03-09-2011 12:38 AM |
Steal this Letter | Colin Dunstan | Lounge | 0 | 10-22-2004 03:26 PM |