View Single Post
Old 03-25-2019, 09:49 PM   #82
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Gorcsev View Post
please how do I add that tag via calibre driver?

and is it possible to change my

p.center {
display: block;
text-align: center;
margin-top: 0;
text-indent: 0;
line-height: 130%;
widows: 2;
orphans: 2;
}

to that only with the same way?

p.center * {
display: block;
text-align: center !important;
margin-top: 0;
text-indent: 0;
line-height: 130%;
widows: 2;
orphans: 2;
}

adding the star and the !important to the existing tags
The driver has an option to modify the CSS. It appends the contents of a CSS fileto all stylesheets in the book. As long as it is valid CSS, it should work. The file is called "kobo_extra.css" and needs to be put in the root partition of the device. I think all you want in the file is:

Code:
p.center  {
  text-align: center !important;
}
I'm minimising what I think is needed, as, f I understand it, I'm not sure that "p.center *" makes sense as a selector. That's because I can't think of any tag that could be contained in a "p" that setting text-align to center makes sense. But, I'll make no claim about being an expert on CSS. If I'm wrong, then putting the full block you have should work.
davidfor is offline   Reply With Quote