CSS for dropcaps exporting to epub
Learn / Forums / EPUB and eBook / CSS for dropcaps exporting to epub
- This topic has 7 replies, 4 voices, and was last updated 4 years, 2 months ago by Jim Swift.
-
AuthorPosts
-
-
January 11, 2016 at 10:58 am #80688Jim SwiftMember
When ID exports my book to epub it creates the following CSS for drop caps
._idGenDropcap-1 {
float:left;
font-size:2.789em;
line-height:1;
margin-bottom:-0.439em;
margin-right:0.05em;
margin-top:0.113em;
}
But it looks bad in ADE and this looks better._idGenDropcap-1 {
float:left;
font-size:2.789em;
line-height: 0.7;
margin-right:0.05em;
margin-top:0.113em;
}The question is — How do I use a custom CSS to overide the faulty settings that InDesign creates
I’ve tried using a custom CSS file and setting tags in the export settings, but I’m not getting it to override the automated settings
Are the values in the automated settings in idGenDropCap configurable?Many thanks
Jim
-
January 11, 2016 at 11:45 am #80690Aaron TroiaParticipant
Hey Jim,
It might depend on where InDesign is putting your CSS in the head of the HTML, if you’re gets listed first and the automated second, yours will get overridden if you are using the same style names. If you name the dropcap character style (and export tag style) something different and assign it to all your dropcaps, then attach it on export, you shouldn’t get overridden by the automated settings.
Aaron
-
January 11, 2016 at 10:37 pm #80710Jim SwiftMember
Many thanks, Aaron. That put me on the right track and I’m getting somewhere now.
But it would still be very helpful to know where Indesign gets the values that are used in the idGenDropCap-1 style and if those values are editable before the CSS is generated?
Jim
-
January 15, 2020 at 7:28 am #14323276Jim SwiftParticipant
Coming back to this after a 4 year break!!
My custom css file is working fine.
But The idGenDropCap-1 class is still being created in the idGeneratedSyles.css even through I have the same class (.dropcaps) in my custom css file and use export mapping to link the two.I think I read somewhere (but cannot find the references now) is that the reason that my own dropcap character style is not showing up as the .dropcaps class in the css file is that I have local overrides turned off.
Please could someone confirm this?
Also, a best practice question, is there any value in trying to eliminate all idGen… classes from the idGeneratedSyles.css stylesheet. I have got it down to just 5 out of the 51 classes (3 char and 2 objects) and wonder if its worth while trying to eliminate those. I think I will have to live with the dropcap style being generated.
-
January 22, 2020 at 11:57 am #14323240Jim SwiftParticipant
Problem solved. The drop cap is now showing as expected after moving away from the idGeneratedSyles.css and just using my own css and tag mapping,
-
February 15, 2020 at 10:56 am #14323072druparkerMember
if you’re gets listed first and the automated second, yours will get overridden if you are using the same style names. If you name the dropcap character style (and export tag style) something different and assign it to all your dropcaps, then attach it on export, you shouldn’t get overridden by the automated settings.
-
February 15, 2020 at 11:28 am #14323071Jim SwiftParticipant
Many thanks, Fleur. I’m now using custom style sheets as you suggest and it does solve a lot of problems :-)
Jim
-
February 18, 2020 at 5:10 pm #14323066druparkerMember
if you’re gets listed first and the automated second, yours will get overridden if you are using the same style names. If you name the dropcap character style (and export tag style) somet https://xender.vip/ https://discord.software/ https://omegle.onl/hing different and assign it to all your dropcaps, then attach it on export, you shouldn’t get overridden by the automated settings.
-
-
AuthorPosts
- You must be logged in to reply to this topic.