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 01-18-2012, 12:23 PM   #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, 04: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,216
Karma: 109735549
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Are you sure? I have not yet seen this behaviour.
Toxaris is offline   Reply With Quote
Old 01-18-2012, 05: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, 10: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 10:39 AM.
Fabe is offline   Reply With Quote
Old 01-19-2012, 10: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
Old 01-19-2012, 11: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, 11: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: 14,774
Karma: 81353584
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, 11: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, 05: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: 6,997
Karma: 8796439
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, 09: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: 45,340
Karma: 32433456
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
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, 09: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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


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


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