|
|
#1 |
|
Member
![]() Posts: 19
Karma: 10
Join Date: Jan 2014
Device: Android tablet + FBReader
|
Beginner extra_css question
Newbie trying to build my first recipe. Content from CSM Daily (using their "print" URL), has a construct:
Code:
<h2 id="summary" class="eza-summary"> <p>A 25-day march and rally days before Turkish President Erdoğan marks the coup anniversary were an emotional show of strength for his foes. But a charismatic leader is needed to unify their ranks.</p></h2> Code:
extra_css = '.eza-summary p { font-style: italic; }'
When I run a test ebook-convert and look at the verbose logging, it reports: 'extra_css': None. Looking at the generated output, I don't see any sign of my extra CSS in stylesheets or inline in the article's HTML. The structure of this bit of content has been rewritten as: Code:
<h2 id="summary" class="eza-summary"> </h2><p class="calibre7">A 25-day march and rally days before Turkish President ErdoÄŸan marks the coup anniversary were an emotional show of strength for his foes. But a charismatic leader is needed to unify their ranks.</p> Am I doing something obviously wrong with my extra_css statement within the recipe, or is this something more complex related to the paragraph-within-H2? Any suggestions will be appreciated. Alan |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,616
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
<p> is not allowed inside <h2>. There it will be automatically moved after it. The selctor you want is
.eza-summary + p { ... } |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Member
![]() Posts: 19
Karma: 10
Join Date: Jan 2014
Device: Android tablet + FBReader
|
Thanks Kovid, that CSS is getting the behavior I was looking for.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stupid beginner question | blackxacto | Sigil | 43 | 04-21-2014 08:20 PM |
| Beginner's question on conversion | jbacinti | Conversion | 7 | 01-02-2014 03:17 PM |
| beginner question | Pogzy | Development | 1 | 02-13-2013 11:34 PM |
| beginner question | Pogzy | Plugins | 1 | 02-05-2013 05:54 PM |
| PRS-T1 Beginner Question re: compatibility | jeolive | Sony Reader | 15 | 01-18-2013 06:02 AM |