View Single Post
Old 05-28-2011, 08:22 PM   #3
jswinden
Astrophotographer
jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.
 
jswinden's Avatar
 
Posts: 5,501
Karma: 6981326
Join Date: Sep 2006
Location: USA
Device: iPad Mini 2, iPhone 5, Nexus 7.2
Quote:
Originally Posted by barium View Post
Can I tell the PRS-350 to ignore ePubs' CSS and use the userStyle.css for all ePubs instead? That would make editing individual ePubs' CSS unnecessary.

I installed porkupan/boroda's firmware, and made some changes to userStyle.css. The changes don't seem to affect ePub formatting. Maybe I'm entering bad CSS code, but I think there may be conflicting CSS in the ePub files I'm viewing.

Can someone please tell me if the CSS code below has errors in it?

(1) eliminate margins:
Code:
p {
   margin-left: 0;
   margin-right: 0;
   margin-top: 0;
   margin-bottom: 0;
}
(2) set line height to 1.04em:

Code:
p {
line-height: 1.04em;
}
(3) eliminate blank lines between paragraphs and indent paragraphs:

Code:
p, div {
margin: 0pt;
border: 0pt;
text-indent: 1.5em;
}
Maybe adding !important to each item would do the trick?
-------------------------------------------------------------------------

I think you need a measurement type for margin:

Code:
p {
   margin-left: 0em;
   margin-right: 0em;
   margin-top: 0em;
   margin-bottom: 0em;
}
or just simplify to p { margin: 0em }.

I doubt if p { line-height: 1.04em } will display any different than p { line-height: 1.00em } unless em is really big.

All the other CSS looks fine, except that I would use em rather than pt for ereaders.

I'm not familiar with porkupan/boroda's firmware, so it might just be the default that you are changing. I would not be surprised if the book's CSS overrides the firmware defaults.

Also, if you edit your ePubs with Sigil you will get much cleaner CSS and HTML. Calibre adds too much garbage to the file which makes it difficult to read when trying to make modifications.

Last edited by jswinden; 05-28-2011 at 08:45 PM.
jswinden is offline   Reply With Quote