Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2015, 07:53 AM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
FBReader ignores margin-top

I'm using FBReader version 2.2.7 on my MB501 Android phone, running Android 2.3.7 (the latest version it will run).

I notice that it does not seem to honour "margin-top" CSS in ePubs.
I use this style:

Code:
.noindent {
display: block;
text-indent: 0;
margin-top: 2em;
}
This is intended to put approx 2 line spaces above the para starting a subsection. This displays in Calibre and Sigil, for instance, on Windows. But in FBreader it has no extra space above. It does have no indent, so the style is not being completely ignored.

Is this a bug in FBreader or my styles?

Do I actually have to use nbsp paragraphs to make space between paras reliably?
AlanHK is offline   Reply With Quote
Old 02-17-2015, 11:55 AM   #2
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Quote:
Originally Posted by AlanHK View Post
Do I actually have to use nbsp paragraphs to make space between paras reliably?
That would be the worst possible solution. Did you try setting margin-top in pixels? Is your ePub validated?

I recommend using Gitden reader, it's the best one out there in my experience.
odedta is offline   Reply With Quote
Advert
Old 02-17-2015, 12:36 PM   #3
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by odedta View Post
That would be the worst possible solution. Did you try setting margin-top in pixels? Is your ePub validated?
I used to use pixels, but ems seem more logical, as a ratio of the font size.
I'll try it though.
Sigil and Calibre both say "No errors".

Quote:
Originally Posted by odedta View Post
I recommend using Gitden reader, it's the best one out there in my experience.
Needs Android 4, won't run on my phone.
AlanHK is offline   Reply With Quote
Old 02-17-2015, 01:04 PM   #4
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Try to validate via idpf just to be on the safe side. It seems far fetched that an epub reader would ignore a simple css rule as that
odedta is offline   Reply With Quote
Old 02-17-2015, 01:08 PM   #5
Section8
Addict
Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.
 
Section8's Avatar
 
Posts: 264
Karma: 2121470
Join Date: Oct 2011
Location: Arlington, TX
Device: Kindle PW4, Moon+ Reader on a cheap Android tablet
According to this page: http://fbreader.org/content/book-for...-not-supported, for epubs:
Quote:
CSS support is not full.
Have you tried an equivalent "margin" such as: "margin: 2em 0 0;" ?
Section8 is offline   Reply With Quote
Advert
Old 02-17-2015, 10:28 PM   #6
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by odedta View Post
Try to validate via idpf just to be on the safe side. It seems far fetched that an epub reader would ignore a simple css rule as that
Validates, no errors.
Same with "Flight Crew" in Sigil.
And http://jigsaw.w3.org/css-validator/validator

Quote:
Originally Posted by Section8 View Post
Have you tried an equivalent "margin" such as: "margin: 2em 0 0;" ?
Tried all of these. All look about the same in Calibre or Sigil, all have no head space in FBReader.

Code:
.noindent {
  display: block;
  text-indent: 0;
  margin-top: 2em;
 }
.noindent {
  display: block;
  text-indent: 0;
  margin-top: 36px;
 }

.noindent {
  display: block;
  text-indent: 0;
  margin-top: 36pt;
 }

.noindent {
  display: block;
  text-indent: 0;
  margin: 36px 0px 0px 0px;
 }

Doesn't anyone here use FBReader?

I sent an email to their support, but no response. They don't seem to have a dedicated forum.
Though I think it's a one-man project and it's free, so I cant complain too much.

Here's the complete CSS just in case anyone sees some weird interaction.
But only "p" should matter, and that has "margin:0".


Spoiler:
Code:
p {
  display: block;
  text-align: justify;
  margin: 0;
  text-indent: 18pt;
}

.noindent {
  display: block;
  text-indent: 0;
  margin-top: 2em;
 }

h1 {
  text-align: center;
  display: block;
}
h2 {
  text-align: center;
  display: block;
  font-weight: bold;

} 
h3 {
  text-align: center;
  display: block;
  font-size: 1.29167em;
  font-style: italic;
  font-weight: bold;
  line-height: 1.2;
 }

.center {
   display: block;
   text-align: center;
   text-indent: 0;
}
.poem {
        text-align: left;
        text-indent: 0em;
        margin-left: 20%;
        margin-right: 0.5em;
        margin-bottom: 1em;
        margin-top: 1em;
        }

a { text-decoration: none;}

small { font-size : 0.8em;}
AlanHK is offline   Reply With Quote
Old 02-18-2015, 01:21 AM   #7
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Have you tried padding-top?
dgatwood is offline   Reply With Quote
Old 02-18-2015, 06:01 AM   #8
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by AlanHK View Post
Doesn't anyone here use FBReader?
I use Overdrive on my Fire tablet for the occasional epub. It's free and it works well for me.
Notjohn is offline   Reply With Quote
Old 02-18-2015, 06:42 AM   #9
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by dgatwood View Post
Have you tried padding-top?
Same result: works everywhere except in FBReader.
AlanHK is offline   Reply With Quote
Old 02-18-2015, 07:09 AM   #10
faltradl
Guru
faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.
 
Posts: 602
Karma: 1712372
Join Date: Feb 2013
Location: germany
Device: PocketBook Touch
FBReader ignores many things. It uses then only it's own settings. That's no bug, it's a feature of FBReader. If you dont like this behavior you must use another reader.
faltradl is offline   Reply With Quote
Old 02-18-2015, 10:58 AM   #11
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
I found there is an FBReader group on Google plus:
https://plus.google.com/communities/...99404862312312

Also complaints there about how FBR ignores CSS margins.

So it looks like either live with it or use the dumb blank line method.

Too bad, it seems to me that it is hardly the most complex kind of formatting.
AlanHK is offline   Reply With Quote
Old 02-18-2015, 11:26 AM   #12
faltradl
Guru
faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.faltradl ought to be getting tired of karma fortunes by now.
 
Posts: 602
Karma: 1712372
Join Date: Feb 2013
Location: germany
Device: PocketBook Touch
First I used FBReader instead of AdobeViewer. *) Its many ignorings are the reason to use now CoolReader. It has problems too, but not so many as FBReader.

*) I hate AdobeViewer has no way to store my standard fontsize. And the second is the mad pagecounting.
faltradl is offline   Reply With Quote
Old 02-22-2015, 07:52 PM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,577
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by faltradl View Post
FBReader ignores many things. It uses then only it's own settings. That's no bug, it's a feature of FBReader. If you dont like this behavior you must use another reader.
In plain English, FBReader ignores too many things. So the best way to read ePub with Android is with a program that doesn't ignore most of your CSS.
JSWolf is offline   Reply With Quote
Old 02-22-2015, 07:54 PM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,577
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by faltradl View Post
First I used FBReader instead of AdobeViewer. *) Its many ignorings are the reason to use now CoolReader. It has problems too, but not so many as FBReader.

*) I hate AdobeViewer has no way to store my standard fontsize. And the second is the mad pagecounting.
ADE's page count is the best out there. It's not mad at all. It's done in a way that does not change based on font size, margins, line height, hyphenation, etc. It's based on 1024 bytes of compressed data = one page.
JSWolf is offline   Reply With Quote
Old 02-22-2015, 10:22 PM   #15
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Quote:
Originally Posted by AlanHK View Post
I found there is an FBReader group on Google plus:
https://plus.google.com/communities/...99404862312312

Also complaints there about how FBR ignores CSS margins.

So it looks like either live with it or use the dumb blank line method.

Too bad, it seems to me that it is hardly the most complex kind of formatting.
I suggest that a better alternative would be to use an app which honours the publisher's CSS.

I've designed the occasional ebook myself, for a small press in the UK and for the MobileRead forum. It's hard to express how irritating it is to design an ebook and make sure it validates, and then get complaints that it doesn't work because the complainant uses an app which sets its own idiosyncratic rules.
AlexBell is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS: margin-top and margin Leonatus ePub 16 06-16-2014 04:29 AM
CSS margin instead of margin-top, etc. icallaci Conversion 24 10-19-2013 09:52 AM
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; } cybmole Conversion 15 02-12-2011 11:57 AM
calibre ignore margin-top and margin-bottom bender Calibre 2 12-11-2009 06:58 AM
fbreader ignores line breaks red_dragon OpenInkpot 3 03-20-2009 08:38 AM


All times are GMT -4. The time now is 01:28 PM.


MobileRead.com is a privately owned, operated and funded community.