01-15-2013, 05:36 PM | #1 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Styling lists
Hey guys,
Anyone know if there's a way to change lists to remove the period or change it to something else? So instead of A., B., C., I'd like it to be A), B), C) or 1), 2) 3). I found some css examples but couldn't get any of them to work. |
01-15-2013, 06:11 PM | #2 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Don't try to do anything other than a simple bulleted list or a simple numbered list in an ebook. And even then ... consider not using a list element at all. It doesn't require ol or ul to display numbers/bullets/letters/etc next to text indented to various levels. Even if you get the complex list/outline looking the way you like it, it will likely only display properly on the one device/app you tested it on. It will make you cry when you see it on another device.
|
01-16-2013, 06:20 AM | #3 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Lists are the way to disaster. I agree with DiapDealer, avoid them while you can.
|
01-16-2013, 09:40 AM | #4 |
Evangelist
Posts: 450
Karma: 343115
Join Date: Nov 2009
Location: Romania
Device: PW2 2014
|
Bull. Anything can be done with CSS, even if they end up as paragraphs that start with 1), 2), 3), etc. Of course, you would have to actually type the numbers/letters yourself... But if it looks like a list, nobody will care if it has or doesn't have <ol> or <ul> tags - except maybe the extremely geeky people, people that study the ePub or try to convert it. But that's not your target audience. Don't worry about them. As long as it looks fine in ADE and iBooks, everything should be all right.
|
01-16-2013, 10:02 AM | #5 | |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It is the implementation in EPUB viewers. Lists that look great on the desktop, are a disaster on my hand held. So go ahead and code your Lists using CSS, as long as you only want to view it on a desktop. |
|
01-16-2013, 10:18 AM | #6 | |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
I fully support your suggestion that paragraphs starting with 1), 2), 3) can be used just as effectively. Did I not say that clearly enough? |
|
01-16-2013, 12:07 PM | #7 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
01-16-2013, 02:36 PM | #8 |
Wizard
Posts: 1,496
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Kindle Oasis 2, Sony PRS-T2
|
Hi, I'm beginning to believe that lists are not the way to go for my internal TOC pages, because after testing in some apps, I found that while the list items work in an ordered list, the chapter numbers that should be generated don't always! Sometimes just bullets display, even with the <ol> tag being used. Or if they are generated, sometimes the first digit is cut off.
But I need some help figuring out how to do the same thing lists do with paragraphs. So how do you get decimal numbers to line up neatly? (I'm making up chapter titles below.) 1. She Looked Back 2. She Looked Forward 3. Her Dog Ate Her Homework . . 9. Beowulf Comes Alive 10. This Is Where I Need Help? What I want to happen, is for the decimals to line up. I can make it do it with an before the single digit numerals, but is that the best way? And what about when you get into old style Roman numerals, like IX. X. XII. and the like, where you may be dealing with more than just two digits? More non-breaking spaces? Looks hideous in the code! Further, with an ordered list, when the font size gets large, the title breaks up in a way that it lines up neatly under the TEXT and not under the chapter numbers. How do I make that happen with paragraphs? And lastly, I've noticed that various Android reader apps don't necessarily render paragraphs as styled EITHER, so doesn't a list made with paragraphs also have a chance of not displaying as styled as well? Trying to learn, because I want what epubs I make to look nice on as many reading systems as possible. |
01-16-2013, 02:48 PM | #9 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
You can assign a margin to your index paragraph styling and in that styling, say no indent.
If you must line them up, you can use a table and right align them in a cell. But tables are not always handled well either. |
01-16-2013, 03:59 PM | #10 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Thanks everyone for the ideas. Seems yes lists are not the way to go. Do you guys think a table is likely the best or only alternative (to get decimals or another separator to align as graycyn would like?) The only other thing I can think of is a definition list though that also has issues with ADE.
|
01-16-2013, 09:49 PM | #11 | |
Wizard
Posts: 1,496
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Kindle Oasis 2, Sony PRS-T2
|
Quote:
I wouldn't bother with an internal TOC list at all, except it seems to be needful for the Kindle conversion navigation. I guess I'll do some testing, see which looks the least worst to me. |
|
01-17-2013, 04:06 AM | #12 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I wouldn't use a list. Not only for the already known styling problems, but because the chapter numbering is probably fixed: If chapter 2 is " She Looked Forward", you wouldn't want it to appear as chapter 3 in the TOC because you accidentally changed, or because the renderer fails in generating the correct numbers. Bottom line: do not rely on generated content.
You can use table styling without table coding. Use your normal provision of <p>, <div>, <span> with classes, and give them "display: table-row", "display: table-cell", etc. in CSS. It might work... |
01-17-2013, 02:03 PM | #13 |
Wizard
Posts: 1,496
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Kindle Oasis 2, Sony PRS-T2
|
Thanks, I may try that. This learning to make epubs is sure an adventure! I'm not much for computer or video game puzzles, but this sort of thing I like. I may still be doing stuff wrong, I'm sure my CSS isn't the most elegant or efficient, but with the exception of the lists thing, stuff appears to be working well.
I learn a lot from folks here, so thanks! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Consistent styling of LI tags in ePubs | Agama | Conversion | 7 | 10-01-2011 11:45 AM |
CSS Styling not showing up in digital editions | sjkramer | Sigil | 9 | 01-30-2010 10:46 AM |
Font weight and other styling with RTF for BeBook | spaze | Other formats | 1 | 09-05-2009 03:25 PM |
Accessories Kindle Cover - Styling & Functional | FrankN | Amazon Kindle | 2 | 04-30-2008 12:36 PM |