View Single Post
Old 01-24-2014, 05:38 PM   #1
fenuks
Enthusiast
fenuks began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Aug 2011
Device: Amazon Kindle 3
Extra CSS and class renaming

Hi, I wrote recipe for page which has "aligncenter" class for image. I don't use its CSS (no_stylesheets = True), but I wrote extra_css = '.aligncenter {display: block; margin-left: auto; margin-right: auto;}'. Problem is that calibre changes class name from "aligncenter" to "aligncenter1", next class occurrence is renamed to "aligncenter2" etc.

I used debug option to check where renaming is done. Input and parsed html has correct class names, but processed html has changed class name, so my extra_css do not work and I'm not changing it. Is this some kind of bug or this is intended and how to make extra_css work?

Thanks.
fenuks is offline   Reply With Quote