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, 08: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, 09:00 PM   #2
theducks
Grand Sorcerer
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: 15,284
Karma: 6022733
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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
Old 10-17-2012, 09: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: 9,551
Karma: 44291176
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, 09: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, 10:11 PM   #5
theducks
Grand Sorcerer
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: 15,284
Karma: 6022733
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Jorge Junior View Post
Thanks, theducks.
You are welcome. Diap's suggestion is
theducks is offline   Reply With Quote
Old 10-18-2012, 08: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,086
Karma: 1444487
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, 10:58 AM   #7
dwig
Guru
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: 996
Karma: 1843322
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Dell Venue 8 Pro - Retired:Kindle 3, Clie UX50, T415, ...
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 11:02 AM.
dwig is offline   Reply With Quote
Old 10-18-2012, 11:24 AM   #8
theducks
Grand Sorcerer
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: 15,284
Karma: 6022733
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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, 12:32 PM   #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: 65,567
Karma: 44144193
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
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, 12:07 PM   #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, 01: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: 6,321
Karma: 4964183
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 offline   Reply With Quote
Old 11-04-2012, 02: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, 01: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, 11: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: 38,637
Karma: 19637653
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
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 05:49 PM
The Dutch letter 'IJ'. mbovenka Library Management 9 12-29-2011 04:21 AM
How not to capitalize titles from meta data? rogue_librarian Library Management 14 12-10-2011 09:31 PM
Capitalize Authors Names iridius Library Management 7 03-09-2011 01:38 AM
Steal this Letter Colin Dunstan Lounge 0 10-22-2004 04:26 PM


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


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