12-26-2008, 06:25 PM | #16 | |
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
|
|
01-09-2009, 03:53 PM | #17 |
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
I had a question.
I used this code. <head> <style type="text/css"> .toc {text-indent: 0in; page-break-after:always} </style> </head> and added <span class="toc"> </span> to my Table of Contents. It worked. However when I tried the same thing on another section of the document it didn't work. The first line was indented. Is this something you can only use once in a document? Or do I need to make another class for my story title, author, summary, and author note section? |
Advert | |
|
01-09-2009, 04:20 PM | #18 |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
|
01-09-2009, 05:21 PM | #19 |
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
I don't suppose you can share the code? I don't really get what you mean? Though I understand what you mean about using the <div> tag instead. Though I'm not sure what the difference is between span and div.
|
01-09-2009, 05:52 PM | #20 | |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
The only difference between the <span/> and <div/> tags is that by default the <span/> tag creates an inline-level element while the <div/> tag creates a block-level element. This matters because certain properties -- like 'text-indent' -- apply only to block-level elements. If you want your specified 'text-indent' to be applied consistently, you have to make sure the element with that property is a block-level element. The two basic ways to do that are to use tags which create block-level elements by default (like <div/>) or specify a CSS property which causes the element to become block-level -- the most basic one being to set 'display' to 'block'. Make sense? Last edited by llasram; 01-09-2009 at 05:55 PM. |
|
Advert | |
|
01-09-2009, 06:07 PM | #21 | |
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
|
|
01-09-2009, 06:11 PM | #22 |
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
P.S.
so would this by how the display:block should look in my header information?
<head> <style type="text/css"> .toc {text-indent: 0in; page-break-after:always} display:block </style> </head> Or is the display:block added like {display:block; text-indent: 0in; page-break-after:always} Sorry if this is an incredibly dumb question. I goggled this but no one is saying where this goes in the code? |
01-09-2009, 06:26 PM | #23 | |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
Code:
SELECTOR { PROPERTIES } Code:
PROPERTY: VALUE; Code:
.toc { display:block; text-indent: 0in; page-break-after:always; } So that will make any element with a 'class' attribute of 'toc' become a block element which doesn't indent anything within the element, and has a page break after the end of the element. |
|
01-09-2009, 06:51 PM | #24 | |
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
Will I still need to use <div> or should I continue to use <span> I'm assuming the <span> tag should work now. Again thank you so much for your help and I think I'm gaining a better understanding of how this works. At this point I'm hoping this css code will help save me a lot of time on preparing my html docs for conversion to LRF. |
|
01-09-2009, 07:28 PM | #25 | ||
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
Quote:
May I ask why you're creating LRFs instead of EPUBs? With the sole exception of justified text, you should get much better results on the Sony Reader using EPUB. |
||
01-09-2009, 08:10 PM | #26 | |
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
I uploaded a few html files but it's really hit or miss on what happens to it and I'm still unsure about css. Right now with my current settings my files come out Times New Roman, size 12 font, margins just the way I like and all the paragraphs are indented. Plus I keep reading something about page breaks? I have some LRF files that come out to 6000 pages which is what I want. and just to be clear on the previous topic I need to type in <div class="toc"> </div> in order for my stylesheet to work properly every time I use it? |
|
01-09-2009, 08:33 PM | #27 | |||
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
Quote:
Quote:
If you have the CSS we discussed, either '<div class="toc"> </div>' or '<span class="toc"> </span>' will work, just '<div class="toc"> </div>' is better from a "markup aesthetics" standpoint. Just put the text you want to have no indent within the <div/> or <span/> element and you're good to go! |
|||
01-09-2009, 08:51 PM | #28 | |
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
Though I am tempted to figure it out sooner rather than later since I found out that LRF files can cause my reader to crash/reboot...which is highly annoying. And also with any hope ePub will be added to more e-ink devices in the future... but if I have to do substantial changes to my html files that would be a real hassle. I think I'll have to adjust the font size myself because I like to be able to read the text big and clearly without having to magnify. So do you think the stylesheet built into my html docs will convert over to ePub? I wasn't sure if Calibre overwrote what was written in the document? or maybe I should create an external stylesheet to link to? but really the biggest obstacle to me switching over to ePub has more to do wtih lack of time to experiment with settings and find the one that I like best. though I get the feeling the more I know about css the more control I'll have over presentation on my converted files. Again, I can't thank you enough you've been very patient. |
|
01-10-2009, 03:43 AM | #29 | ||
Wizard
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
I tested the new code and it didn't work.
Here is what I have in the header. Quote:
Quote:
I would really appreciate a fresh pair of eyes that could hopefully point out what I'm doing wrong. I'd appreciate any and all help, Amalthia P.S. I'm going to bed now...so I'm not ignoring on purpose. Last edited by Amalthia; 01-10-2009 at 03:47 AM. |
||
01-10-2009, 08:59 AM | #30 | |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
So with CSS of: Code:
.toc p { display: block; text-indent: 0in; page-break-after: always } |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ligatures and indent questions | speakingtohe | Calibre | 2 | 08-23-2010 07:33 PM |
Paragraph indent-size should not applied to centered paragraphs? | ShellShock | Calibre | 3 | 01-16-2010 11:54 AM |
removing spacing between paragraphs WITHOUT touching indent? | ferossan | Calibre | 2 | 12-24-2009 02:12 PM |
Can't have hanging indent in Mobi | Yo_E_C | Introduce Yourself | 2 | 08-21-2009 08:51 PM |
Plucker: Can I indent paragraphs? | alexdouglas | Reading and Management | 3 | 08-07-2006 05:58 PM |