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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-17-2012, 07:23 PM   #1
Jorge Junior
Member
Jorge Junior began at the beginning.
 
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?
Jorge Junior is offline   Reply With Quote
Old 10-17-2012, 08:00 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jorge Junior View Post
How do I get my CSS to do that?

Where is God?
Code:
<span class='bigletter'>W</span>here is God?
in the CSS
.bigletter {font-size: 175%;}
theducks is offline   Reply With Quote
Advert
Old 10-17-2012, 08:08 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,441
Karma: 192992430
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:
Even though theducks graciously chose to answer the question.
DiapDealer is offline   Reply With Quote
Old 10-17-2012, 08:56 PM   #4
Jorge Junior
Member
Jorge Junior began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
Thanks, theducks.
Jorge Junior is offline   Reply With Quote
Old 10-17-2012, 09:11 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jorge Junior View Post
Thanks, theducks.
You are welcome. Diap's suggestion is
theducks is offline   Reply With Quote
Advert
Old 10-18-2012, 07:39 AM   #6
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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.
mrmikel is offline   Reply With Quote
Old 10-18-2012, 09:58 AM   #7
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
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:
Originally Posted by mrmikel View Post
...
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.
+1 ... looking at the code in other ePubs that display the type of formatting you're trying to emulate is always a good idea.

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.
dwig is offline   Reply With Quote
Old 10-18-2012, 10:24 AM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by dwig View Post
+1 ... looking at the code in other ePubs that display the type of formatting you're trying to emulate is always a good idea.

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;}

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
theducks is offline   Reply With Quote
Old 10-18-2012, 11:32 AM   #9
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
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.
HarryT is offline   Reply With Quote
Old 11-04-2012, 11:07 AM   #10
Jorge Junior
Member
Jorge Junior began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
Quote:
Originally Posted by Jorge Junior View Post
How do I get my CSS to do that?

Where is God?
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;
}
Jorge Junior is offline   Reply With Quote
Old 11-04-2012, 12:28 PM   #11
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
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; }
Jellby is online now   Reply With Quote
Old 11-04-2012, 01:10 PM   #12
Jorge Junior
Member
Jorge Junior began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
Thank you, Jellby.
Jorge Junior is offline   Reply With Quote
Old 11-05-2012, 12:25 AM   #13
lrui
Enthusiast
lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.
 
lrui's Avatar
 
Posts: 49
Karma: 475062
Join Date: Aug 2012
Device: nook simple touch
Quote:
Originally Posted by Jorge Junior View Post
How do I get my CSS to do that?

— Where is God?
http://john.nachtimwald.com/category...rmatting-tips/

Here is some EPUB formatting tips, it can help you to make epub visually appealing.
lrui is offline   Reply With Quote
Old 11-14-2012, 10:30 PM   #14
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,510
Karma: 126422064
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 lrui View Post
http://john.nachtimwald.com/category...rmatting-tips/

Here is some EPUB formatting tips, it can help you to make epub visually appealing.
John's blog need someone to error check it. For example...

Code:
span.ri {
    font-size: 4em;
    font-weight: bold;
}
That's not correct. It leaves a larger space between the first line and the rest of the paragraph.

Code:
span.ri {
    font-size: 4em;
    font-weight: bold;
    line-height: 0
}
Now that is correct.
JSWolf is offline   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
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


All times are GMT -4. The time now is 04:09 AM.


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