01-22-2011, 08:32 AM | #1 |
Zealot
Posts: 146
Karma: 2594
Join Date: May 2009
Device: Kindle PW,Sony 700, Sony 950 (Daily Edition),Nook Color,iPad
|
Line after paragraph, CSS?
What code and where would I enter it if I want to add a line after each paragraph?
Thanks for any help, just starting to really look at formating the code. Thanks |
01-22-2011, 10:13 AM | #2 |
Well trained by Cats
Posts: 29,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Maggie
Ar you wanting a Horizontal Rule(<hr /> ? If you want a full width rule with default properties, just place <hr /> between the closing </p> and the next opening <p in Code View. (hr can NOT be within a paragraph) If you want a smaller (%) width,centered; wider; or other line style or color(s) some CSS selector creation is called for. Test visually, on a ADE (and maybe others) readers. WYS in Sigil-Calibre Inot WYG on thes readers. Basically centering is not reliable on many readers. to center a 25% width rule you make the Left Margin 32.5% to force the rule to the center. margin-left = (100-rule_width%)/2 |
Advert | |
|
01-22-2011, 10:31 AM | #3 |
Zealot
Posts: 146
Karma: 2594
Join Date: May 2009
Device: Kindle PW,Sony 700, Sony 950 (Daily Edition),Nook Color,iPad
|
thanks, I should have been more detailed.
I am looking to add a blank line after each paragraph. Exp... Before: He sniffed, said nothing. His father had been Kjartan the Cruel, a Dane who had whelped Sihtric on one of his Saxon slaves. Yet Sihtric was a good boy, though in truth he was no longer a boy. He was a man who had stood in the shield wall. A man who had killed. A man who would kill again tonight. “I’ll find you a wife,” I promised him. It was then we heard the screaming. It was faint because it came from very far off, a mere scratching noise in the darkness that told of pain and death to our south. There were screams and shouting. Women were screaming and doubtless men were dying. After: He sniffed, said nothing. His father had been Kjartan the Cruel, a Dane who had whelped Sihtric on one of his Saxon slaves. Yet Sihtric was a good boy, though in truth he was no longer a boy. He was a man who had stood in the shield wall. A man who had killed. A man who would kill again tonight. “I’ll find you a wife,” I promised him. It was then we heard the screaming. It was faint because it came from very far off, a mere scratching noise in the darkness that told of pain and death to our south. There were screams and shouting. Women were screaming and doubtless men were dying. Last edited by Maggie-Me; 01-22-2011 at 10:35 AM. |
01-22-2011, 10:45 AM | #4 |
Well trained by Cats
Posts: 29,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Just increase/ add a [B]margin-bottom:1em to your paragraph style (in the CSS)
(I happen to split that between margin-top: .5em and margin-bottom: .5em. and I bump the bottom to .8em for non-indented paragraphs. to please my eye ) Last edited by theducks; 01-22-2011 at 10:46 AM. Reason: clarity |
01-23-2011, 06:26 AM | #5 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
like tha man said - but in more detail.
open book in sigil, click styles in LH window. open stylesheet.css see stuff like this .calibre12 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: center; text-indent: 0 tweak margin values to suit.. tip ; look at a book textpage in code view beforehand to see which style element is used for paragraphs - that is the one to locate & tweak within the stylesheet. e.g. if book has this <p class="calibre9">“Christine, it’s good of you to come,” Marcus said.</p> then I need to tweak calibre9 spec. my calibre 9 in stylesheet is .calibre9 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: justify; text-indent: 1em } that margin top value is controlling my paragraph separation Last edited by cybmole; 01-23-2011 at 06:29 AM. |
Advert | |
|
01-23-2011, 07:02 AM | #6 |
Member
Posts: 14
Karma: 10
Join Date: Dec 2010
Location: BC
Device: Kobo, EeePC w/ FBReader
|
Having a line after a paragraph is the default. Just remove any references to margin-top and margin-bottom.
|
01-23-2011, 07:20 AM | #7 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
|
01-23-2011, 07:38 AM | #8 | |
Well trained by Cats
Posts: 29,812
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:
OTOH line-spacing usually defaults except the I have drop caps, or small-caps where I need to adjust the balance |
|
01-23-2011, 07:43 AM | #9 |
Zealot
Posts: 146
Karma: 2594
Join Date: May 2009
Device: Kindle PW,Sony 700, Sony 950 (Daily Edition),Nook Color,iPad
|
thanks all. I like keeping the code in the set up and changing the value, this gives me what I wanted.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
First paragraph line indents | jhempel24 | Sigil | 10 | 11-23-2010 07:26 PM |
Extra paragraph line when converting from LRF | jhempel24 | Calibre | 3 | 08-18-2010 07:00 AM |
Prevent Calibre to paragraph each line | armkbdotcom | Calibre | 3 | 05-29-2010 03:15 PM |
Paragraph indents from command line | JSWolf | Calibre | 4 | 11-06-2008 08:41 PM |
last line in each paragraph centred | scgf | Calibre | 9 | 09-10-2008 02:23 PM |