![]() |
#1 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Mar 2013
Device: iMac 10,1, OSX10.9
|
Newbie - Edit a style to center all
Opened an ebook in Sigil 0.7.4
Selected Styles/Stylesheet.css I see several styles, example: .calibre1, .calibre11 I see paragraph headings: H1, H2 etc. What is the difference in the two style types above? If I want to make a certain subhead always center, do I change the paragraph, or the associated .calibre#? In the sample below, where is the "center" instructions to go? .calibre11 { display: block; font-size: 1.125em; font-weight: bold; line-height: 1.2; margin: 3em 0 1em } |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,641
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
.calibre11 {
text-align: center; /* new property to add */
text-indent: 0; /* new property to add */
display: block;
font-size: 1.125em;
font-weight: bold;
line-height: 1.2;
margin: 3em 0 1em
}
Regards Rubén |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
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
|
CSS uses either the tag names or the class attribute to do its work. Cascading, The C in CSS means it will use the more detailed entry to override the less detailed entry, meaning a class="xxx" attribute will override a tag like h2, or you can also use them together to be even more precise. So the answer is it will work in either the styles or the tags but the effect may end up different. For example if you want all h2 tags to be centered you would do it in the tags but if only some of the tags then use styles.
Note also in xhtml the tags are in lower case. Dale |
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Mar 2013
Device: iMac 10,1, OSX10.9
|
Thank you for your responses. Most helpful.
Is there an "ebooks for dummies" which includes how to edit styles and such? It will have to be the newbie's version. |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Mar 2013
Device: iMac 10,1, OSX10.9
|
What is the difference in Calibre and Sigil?
I wanted to add my own cover. It was a jpg. Is there a minimum or maximum resolution/dimension for ebooks? Why did I have to CONVERT a free ebook to Calibre ebook in order to add the jpg cover I had made? |
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,908
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Quote:
![]() Polish would have done it without other changes creeping in Modify EPUB (PI) could have done it And you can do it with Sigil with a little more effort (and extra control) |
||
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
If the free ebook is already and ePUB, you don't need to convert. Just open it in Sigil. There is a tutorial floating around here, I think in the workshop subforum with a quick introduction to html/css to get you started. I believe it is from Pablo. |
|
![]() |
![]() |
![]() |
#8 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
You can learn about HTML and CSS at
http://www.w3schools.com These are general pages on these which are applicable to web pages, and mostly applicable to epubs. There are some things you can do on web pages you can not do on epubs, currently anyway. But the explanations are good and they have a try it section with many things that allows you to try out changing an attribute and see what happens in a window on the same page. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bulk metada edit error trying to edit tags | Purple Lady | Calibre | 8 | 02-17-2011 06:09 PM |
newbie - keep original html and style | Ray Tayek | Calibre | 7 | 12-01-2010 02:11 PM |
Newbie - How to Edit | AdeptJR | Calibre | 8 | 10-20-2010 12:31 PM |
Mobi TOC style vs ePub style? | phearlez | Kindle Formats | 3 | 04-11-2010 06:35 AM |