|  02-17-2011, 02:56 PM | #46 | |
| Grand Sorcerer            Posts: 11,470 Karma: 13095790 Join Date: Aug 2007 Location: Grass Valley, CA Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7 | Quote: 
 Dale | |
|   |   | 
|  02-17-2011, 03:05 PM | #47 | 
| Wizard            Posts: 3,720 Karma: 1759970 Join Date: Sep 2010 Device: none | 
			
			ok , I get that now, thanks - so what needs to go in extra-css for override to work. - where does !important go also, new example - I thought styles applied left to right, thus in this code ( which is a chapter 1st line), calibre5 overrides calibre2 Code: <p class="calibre2"><strong class="calibre5">Wrapped in</strong> wool blankets here's the definitions, incl the addition to calibre 5: .calibre2 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 1em; text-indent: 1em } .calibre5 { font-weight: bolder; text-indent: 0 } | 
|   |   | 
|  02-17-2011, 03:18 PM | #48 | 
| Guru            Posts: 657 Karma: 64171 Join Date: Sep 2010 Location: Kent, England, Sol 3, ZZ9 plural Z Alpha Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin) | 
			
			The caliber5's text-indent won't get used because it's not in the <p> tag. Try <p class="calibre2 calibre5"><strong>Wrapped in</strong> wool blankets (you might want to remove the font-weight from the calibre5 definition.) | 
|   |   | 
|  02-17-2011, 03:20 PM | #49 | 
| Grand Sorcerer            Posts: 11,470 Karma: 13095790 Join Date: Aug 2007 Location: Grass Valley, CA Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7 | 
			
			For example: margin-right: 0px !important;
		 | 
|   |   | 
|  02-18-2011, 12:49 AM | #50 | 
| Wizard            Posts: 3,720 Karma: 1759970 Join Date: Sep 2010 Device: none | |
|   |   | 
|  02-18-2011, 12:58 AM | #51 | 
| Wizard            Posts: 3,720 Karma: 1759970 Join Date: Sep 2010 Device: none | 
			
			thanks - but I'm still stuck :-( is this valid extra css syntax ? p {margin-top: 0.3em ; margin-bottom: 0.3em !important} I am trying it on epub to epub where the book was previously converted with remove blank lines option ticked. I have unticked remove blank lines now but the extra CSS is not working - tried both with & without the !important tag. it will work if I add it to the stylesheet, but I am seeking a bulk convert solution from within calibre here | 
|   |   | 
|  02-18-2011, 02:08 AM | #52 | |
| Wizard            Posts: 4,520 Karma: 121692313 Join Date: Oct 2009 Location: Heemskerk, NL Device: PRS-T1, Kobo Touch, Kobo Aura | Quote: 
 p {margin-top: 0.3em ; margin-bottom: 0.3em !important ;} | |
|   |   | 
|  02-18-2011, 02:18 AM | #53 | |
| Wizard            Posts: 3,720 Karma: 1759970 Join Date: Sep 2010 Device: none | Quote: 
 no joy i used this exact phrase ( copy n paste to here) p {margin-top: 0.3em ; margin-bottom: 0.3em; !important; } but for info anyway, why is the trailing ; significant I'd really like to apply this to 300+ books & not to have to edit 300+ stylesheets individually ! to reproduce the problem , for more testing. 1, pick a book, any book 2, convert to epub with remove blank lines ticked. 3. now try to convert the output from 2. + add a line spacing setting via extra css. Last edited by cybmole; 02-18-2011 at 02:21 AM. | |
|   |   | 
|  02-18-2011, 03:56 AM | #54 | 
| Enquiring Mind            Posts: 562 Karma: 42350 Join Date: Aug 2010 Location: London, UK Device: Kindle 3 (WiFi) | 
			
			Ummm... actually, it isn't. The semicolon is needed between CSS properties, but isn't required on the last one since that is "closed" by the closing curly bracket. Though it isn't wrong to put a semicolon there - simply not required.
		 | 
|   |   | 
|  02-18-2011, 04:33 AM | #55 | 
| frumious Bandersnatch            Posts: 7,570 Karma: 20150435 Join Date: Jan 2008 Location: Spaniard in Sweden Device: Cybook Orizon, Kobo Aura | 
			
			As far as I know, the "!important" modifier must be specified per property. So, if you want both margins to be high priority, you should use: Code: p { margin-top: 0.3em !important ; margin-bottom: 0.3em !important }Code: p { margin: 0.3em 0 !important } | 
|   |   | 
|  02-18-2011, 05:07 AM | #56 | |
| Wizard            Posts: 3,720 Karma: 1759970 Join Date: Sep 2010 Device: none | Quote: 
 p {margin-bottom: 0.3em; !important;} it did not work. I see no space between lines in output seems that tinkering with the syntax is not addressing root issue that calibre extra-css will not override some explicit stylesheet values, even though it's supposed to ? & I can;t think an alternative batch approach. it would to be something like explode the epub, edit the styesheet.css with find/replace commends in notepad++, (find all margin-top: 0 replace all with margin-top: 0.3em )then reassemble the epub. I can do that manually at the keyboard but have not idea how to build a working batch process equivalent. | |
|   |   | 
|  02-18-2011, 06:28 AM | #57 | 
| frumious Bandersnatch            Posts: 7,570 Karma: 20150435 Join Date: Jan 2008 Location: Spaniard in Sweden Device: Cybook Orizon, Kobo Aura | |
|   |   | 
|  02-18-2011, 06:44 AM | #58 | 
| Wizard            Posts: 3,720 Karma: 1759970 Join Date: Sep 2010 Device: none | 
			
			ok - I will try this p {margin-top: 0.3em !important; } and this p {margin-top: 0.3em !important } no joy with either | 
|   |   | 
|  02-18-2011, 07:29 AM | #59 | 
| Wizard            Posts: 4,520 Karma: 121692313 Join Date: Oct 2009 Location: Heemskerk, NL Device: PRS-T1, Kobo Touch, Kobo Aura | 
			
			Could you post the following parts of your xhtml file: - the part where the external stylesheets are specified - the additional internal styles in the document - the external stylesheets used. I have the feeling that you have a problem with cascading and that your settings are overruled. | 
|   |   | 
|  02-18-2011, 07:59 AM | #60 | 
| Wizard            Posts: 3,720 Karma: 1759970 Join Date: Sep 2010 Device: none | 
			
			sure I though I'd done that earlier. I'll just open a test book... here's a slice of xhtml Code: <style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
</style>
</head>
<body class="calibre5">
  <div class="calibre6">
    <h1 class="calibre11" id="calibre_pb_21"><span class="calibre12">ten</span></h1>
    <div class="calibre13"></div>
    <p class="calibre10"></p>
    <p class="calibre10"><span class="calibre14"><span>It took me a</span> few seconds when I woke up to remember I was in the Soul Identity guesthouse. Val and I had climbed down the hill and returned to the office, where she wasted a few hours giving me demonstrations of her new online applications.</span></p>
    <p class="calibre10"><span class="calibre14">I laughed out loud when I remembered how disappointed I was to go back to work. But I had earned my round-the-clock pay, even if I did have a hard time staying focused on the software.</span></p>.calibre { display: block; font-size: 1em; line-height: 1.2; margin-bottom: 0; margin-left: 0; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; page-break-before: always } .calibre1 { display: table-row; vertical-align: middle } .calibre10 { border-bottom: 0; border-top: 0; display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-top: 0; text-align: justify; text-indent: 1em } .calibre11 { display: block; font-size: 1.25em; font-weight: bold; line-height: 1.2; margin-bottom: 0.67em; margin-left: 0; margin-right: 0; margin-top: 0; page-break-before: always; text-align: center } .calibre12 { color: windowtext; font-size: 0.9em; font-weight: bold; line-height: 1.2 } .calibre13 { border-bottom: 0; border-top: 0; display: block; height: 4px; margin-bottom: 0; margin-top: 0; padding-bottom: 0; padding-top: 0; text-indent: 1em } NB I figure you can reproduce this with ANY epub - maybe I put the formula in another thread -in 2 steps it is: 1. convert epub to epub with the option to remove blank lines set(ticked) in calibre. 2. then try to add add any kind of top / bottom margin via extra css ps the above is a clean source. it is a kindle book that i own, converted to epub by calibre, not processed by any other program ( just viewed in Sigil) Last edited by cybmole; 02-18-2011 at 08:27 AM. | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Indents! Please Help! | Ephraim | Sigil | 8 | 11-23-2010 03:43 PM | 
| Margins and Indents | sloecoach | Calibre | 2 | 09-26-2010 04:41 PM | 
| Display of Hanging Indents | crutledge | Workshop | 1 | 09-25-2009 06:09 PM | 
| RFE: Remove remove tags in bulk edit | magphil | Calibre | 0 | 08-11-2009 10:37 AM | 
| Hanging indents? | llasram | Kindle Formats | 11 | 01-05-2009 10:59 AM |