01-18-2012, 11:23 AM | #1 |
Dylanologist
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 |
01-18-2012, 03:28 PM | #2 |
Wizard
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.
|
Advert | |
|
01-18-2012, 04:38 PM | #3 |
Dylanologist
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
|
|
01-19-2012, 09:36 AM | #4 |
Dylanologist
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 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. |
01-19-2012, 09:43 AM | #5 | |
Zealot
Posts: 121
Karma: 5070
Join Date: Dec 2010
Device: none
|
Quote:
|
|
Advert | |
|
01-19-2012, 10:18 AM | #6 |
Dylanologist
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 |
01-19-2012, 10:26 AM | #7 |
Grand Sorcerer
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.
|
01-19-2012, 10:28 AM | #8 |
Dylanologist
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 |
01-20-2012, 04:04 PM | #9 |
frumious Bandersnatch
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.
|
01-20-2012, 08:40 PM | #10 |
Resident Curmudgeon
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
|
That won't work on any Kobo eink readers. They ignore font-family commands when placed in the body style in the CSS.
|
01-20-2012, 08:48 PM | #11 |
Dylanologist
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
|
|
|
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 |