Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2012, 11:23 AM   #1
Fabe
Dylanologist
Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.
 
Fabe's Avatar
 
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
<ol> format Question

<ol> gives me generic sans-serif text. I want serif text. I tried a variety of coding strategies, but the <ol> text always looks generic. Can I have my way?

I did a search here and several people say the formatting with <ol> is lousy. Most say to hard code the list. I am okay with that provided I can hard code several hundred multi-line paragraphs in a resonable amount of time. Each paragraph will have a unique number. That's why I was looking at the <ol> tag in the first place.

Thanks for any advice. - Fabe
Fabe is offline   Reply With Quote
Old 01-18-2012, 03:28 PM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Are you sure? I have not yet seen this behaviour.
Toxaris is offline   Reply With Quote
Advert
Old 01-18-2012, 04:38 PM   #3
Fabe
Dylanologist
Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.
 
Fabe's Avatar
 
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
Quote:
Originally Posted by Toxaris View Post
Are you sure? I have not yet seen this behaviour.
Oh, I'm sure. Or I'm delusional. I may be writing or implementing the CSS incorrectly. How would you do this?
Fabe is offline   Reply With Quote
Old 01-19-2012, 09:36 AM   #4
Fabe
Dylanologist
Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.
 
Fabe's Avatar
 
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
Coding

Here is my CSS coding:

p {
font-family : serif;
line-height: 1.5em;
font-size: 1em;
text-align: left
}

p.num {
list-style-type:numeric;
}

Here is the result:

Regular paragraph text, formatted correctly.

Text Text

Text Text

Text Text

Text Text

Regular paragraph text, formatted correctly.

Here is a representative sample of HTML coding in the document:

<p>Regular paragraph text, formatted correctly.</p>

<ol class="num">
<li>Text Text</li>

<li>Text Text</li>

<li>Text Text</li>

<li>Text Text</li>
</ol>

<p>Regular paragraph text, formatted correctly.</p>

Last edited by Fabe; 01-19-2012 at 09:39 AM.
Fabe is offline   Reply With Quote
Old 01-19-2012, 09:43 AM   #5
huebi
Zealot
huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!
 
Posts: 121
Karma: 5070
Join Date: Dec 2010
Device: none
Quote:
Originally Posted by Fabe View Post
Here is my CSS coding:

p {
font-family : serif;
line-height: 1.5em;
font-size: 1em;
text-align: left
}

p.num {
list-style-type:numeric;
}

Here is the result:

Regular paragraph text, formatted correctly.

Text Text

Text Text

Text Text

Text Text

Regular paragraph text, formatted correctly.

Here is a representative sample of HTML coding in the document:

<p>Regular paragraph text, formatted correctly.</p>

<ol class="num">
<li>Text Text</li>

<li>Text Text</li>

<li>Text Text</li>

<li>Text Text</li>
</ol>

<p>Regular paragraph text, formatted correctly.</p>
Well, you just defined the class num only for p-elements. So either deéte the p to have a class .num only effexcting every element or write a seperate class named ol.num.
huebi is offline   Reply With Quote
Advert
Old 01-19-2012, 10:18 AM   #6
Fabe
Dylanologist
Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.
 
Fabe's Avatar
 
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
Huebi, thanks for your response. In the CSS file I changed p.num to:

ol.num {
list-style-type:numeric;
}

No difference in the end result. What am I doing wrong. Thanks. - Fabe
Fabe is offline   Reply With Quote
Old 01-19-2012, 10:26 AM   #7
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You're changing the default font on normal paragraphs, but you're not changing it on the <ol> element. Either add the "font-family: serif" to the css for the <ol> element or drop it from both.
DiapDealer is offline   Reply With Quote
Old 01-19-2012, 10:28 AM   #8
Fabe
Dylanologist
Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.
 
Fabe's Avatar
 
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
SOLVED

SOLVED

In the CSS file I had to add the paragraph tags.

My CSS went from this:

ol.num {
list-style-type:numeric;
}

To this:

ol.num {
list-style-type:numeric;
font-family : serif;
line-height: 1.5em;
font-size: 1em;
text-align: left
}

Now it formats and looks fine. - Fabe
Fabe is offline   Reply With Quote
Old 01-20-2012, 04:04 PM   #9
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,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
If you want the default font for normal text to be serif, why not use body {font-family:serif} and just change it for headings if you want? That way you won't need to specif serif for p, ol, ul, div and whatnot.
Jellby is offline   Reply With Quote
Old 01-20-2012, 08:40 PM   #10
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,983
Karma: 128903378
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 Jellby View Post
If you want the default font for normal text to be serif, why not use body {font-family:serif} and just change it for headings if you want? That way you won't need to specif serif for p, ol, ul, div and whatnot.
That won't work on any Kobo eink readers. They ignore font-family commands when placed in the body style in the CSS.
JSWolf is offline   Reply With Quote
Old 01-20-2012, 08:48 PM   #11
Fabe
Dylanologist
Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.
 
Fabe's Avatar
 
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
Quote:
Originally Posted by Jellby View Post
If you want the default font for normal text to be serif, why not use body {font-family:serif} and just change it for headings if you want? That way you won't need to specif serif for p, ol, ul, div and whatnot.
Can you give an example in code? Thanks. - Fabe
Fabe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Question isis Calibre 7 12-21-2011 07:09 PM
Format question cgsmom General Discussions 10 12-01-2011 06:00 PM
Format Question dkb Sony Reader 2 10-20-2010 09:25 PM
Question about the best format(s). morajelly Sony Reader 14 07-14-2009 10:44 PM
Format Question Panin Bookeen 10 02-18-2008 05:45 AM


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


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