MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Sigil book view misbehaving? (https://www.mobileread.com/forums/showthread.php?t=207495)

mariopanz 03-05-2013 03:40 PM

Sigil book view misbehaving?
 
Hello there,
I am using Sygil 0.7.1 and have coded the following

<p class="myclass"> text</p>
<p class="myclass"> moretext</p>
<p class="myclass"> text</p>

and the related CSS reads

.myclass
{
text-align:right;
font-size:100%;
text-indent: 2.5%;
margin-top: 1%;
margin-left: 5%;
font-weight: normal;
margin-right: 5%;
margin-bottom: 1%;
}

This is the problem:other e-readers correctly display the text as intended, whereas Sygil's Book View display many extra spaces between the lines, thus becoming useless for preview purposes. All the other properties are respected.

Maybe there's something I need to know about Sygil's behavior on Book View mode? What am I doing wrong?

:thanks:

DaleDe 03-05-2013 06:38 PM

Quote:

Originally Posted by mariopanz (Post 2445370)
Hello there,
I am using Sygil 0.7.1 and have coded the following

<p class="myclass"> text</p>
<p class="myclass"> moretext</p>
<p class="myclass"> text</p>

and the related CSS reads

.myclass
{
text-align:right;
font-size:100%;
text-indent: 2.5%;
margin-top: 1%;
margin-left: 5%;
font-weight: normal;
margin-right: 5%;
margin-bottom: 1%;
}

This is the problem:other e-readers correctly display the text as intended, whereas Sygil's Book View display many extra spaces between the lines, thus becoming useless for preview purposes. All the other properties are respected.

Maybe there's something I need to know about Sygil's behavior on Book View mode? What am I doing wrong?

:thanks:

Sigil is not a page viewer. It scrolls the page unlike eBooks. Percentages won't work as values since there is no height to the page. You need to use better values. How do you know how big the page is on the eBook? Margins are better set it ems rather than percentages of some unknown size page.

Dale

mariopanz 03-05-2013 08:16 PM

Thanks for your help Dale, it worked nicely. I tought % referred to the size of the font being used and that the em unit, hence, was practically the same.

Jellby 03-06-2013 06:34 AM

Percentages in vertical margins are supposed to be referred to the element's width instead of height (so that margin-top: 5% and margin-right: 5% should be the same size). But of course, the implementation could be wrong in Sigil or in other readers.


All times are GMT -4. The time now is 10:12 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.