![]() |
#1 |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Inserting Spaces according to sigil messes with font
Ok, so I was having trouble with blank spaces and then I found some code to try and it worked.
I inserted <div class="body" style="white-space:normal"> rather than <div class="body" style="white-space ![]() and it did get rid of all the "white space" Now I need to add back a few to set off prose text from a brief little song and then back to prose. Essentially, I want a blank line above and below the song that is in the midst of prose to help offset it and make it look nice. Sigil suggests Don’t. Its much better to use stylesheets to define the amount of space above or below your special sections using a style definition. For instance to leave 1.5 lines of space above a paragraph you can use this style class: p.blankabove { margin-top: 1.5em; } and in your text use the class with your paragraph: <p class="blankabove">My paragraph</p> which I did and it works, but now the text of that paragraph is much larger than the text of all other paragraphs.....why is that? I can always add a space in the book view, but it adds <br /> and I can see from my reading this forum that might not be a good idea. any pointers? Thanks in advance. |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,887
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Sigil has some bad habits. If you try and join 2 paragraphs from Book View (It adds a Style= that results in bigger text ). IMHO do the join in code view by removing from the </p to the > before the first character to be seen (add a space when needed) |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,608
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@rosshalde - I make no claims as to having any expertise on this stuff.
But, if I had your 'problems' I would open the epub in the calibre ebook editor. It has a Live CSS feature that will display all the styling applied to a paragraph, division etc. Styling of a given chunk of HTML (such as paragraph) will typically be inherited (cascade) from multiple chunks within the style sheet(s). I don't know if Sigil has a similar feature, I've not stumbled across it. BR |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You could place the song in a blockquote, that is what I would do.
|
![]() |
![]() |
![]() |
#5 |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
how do i do the block quote thing?
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Simple. Just put the paragraphs you want in blockquote tags. So, something like this:
Code:
<blockquote> <p>First line of the song</p> ... <p>Last line of the song</p> </blockquote> |
![]() |
![]() |
![]() |
#7 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
Code:
blockquote { /* adjust the values to your taste. Stay with units of em or % for best results */ margin-top=0.5em; margin-bottom=0.5em; margin-left=3.0em; margin-right=3.0em; /* put other formatting stuff here +/ } Hth Albert |
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
@st_albert -- small typo but so we don't confuse anyone --- the = in the css should be a : of course (or least I need to do that)
I would define a blockquote class for songs, so that I could apply it only where specifically needed Code:
blockquote.song { margin-top: 1.5em; margin-bottom: 1.5em; margin-left: 4.0em; margin-right: 4.0em; font-style: italic; } blockquote { margin-top: 0.5em; margin-bottom: 0.5em; margin-left: 3.0em; margin-right: 3.0em; } Personal style / opinion Last edited by phossler; 10-27-2014 at 10:05 AM. |
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Stop Sigil from inserting unwanted lines between paragraphs | Benasam | Sigil | 16 | 05-28-2014 03:16 PM |
Sigil adds spaces between HTML tags, creating strange characters | chezjim | Sigil | 10 | 06-10-2011 04:00 AM |
Extra spaces in Sigil | noteon | Sigil | 2 | 04-08-2011 02:42 PM |
Can I stop Sigil from inserting sgc formatting commands? | ramjet1953 | Sigil | 4 | 11-22-2010 11:59 AM |
Sigil Inserting hard line wraps at ~100 characters | ldolse | Sigil | 6 | 08-07-2009 11:00 AM |