10-29-2014, 09:17 PM | #1 |
Zealot
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
How do I adjust my css to do.....?
I have a book that is mostly simple text requiring no indentation at all, which is great.
But, there is an introduction that does require normal English rules of paragraph layout, with the first word of the beginning of a paragraph indented. What do I need to do differently to make this work? In the code, the text in the forward and the text in the main book have the same labeling, so I don't want to mess with that. Do I need to give the paragraph different labeling and then define the values in the css? |
10-29-2014, 09:59 PM | #2 |
Grand Sorcerer
Posts: 12,166
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Why wouldn't you just add a new css class indent
Code:
.indent {text-indent: 1cm } Code:
<p class="indent">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sit amet diam vestibulum, aliquam erat eget, vestibulum eros. Cras tempus ante sed sagittis rhoncus. Morbi volutpat, massa vitae porta sollicitudin, mi felis gravida lacus, nec fringilla diam nulla nec ligula. Pellentesque erat elit, malesuada quis consectetur vulputate, elementum vel eros. Vivamus porta eros enim, at pretium felis maximus in. Ut consequat vitae massa at egestas. Mauris dictum nec odio at faucibus.</p> <p>Curabitur congue turpis id purus fermentum, ut euismod libero luctus. In hac habitasse platea dictumst. Nam elit nisi, ullamcorper eu condimentum in, fringilla vel augue. Aenean sodales velit massa, ac bibendum quam lacinia et. Nulla ut quam nec sem facilisis aliquet. Sed tristique, odio ut accumsan lobortis, ex elit commodo nisl, sit amet feugiat sem lectus quis nunc. Fusce vehicula laoreet aliquam.</p> |
Advert | |
|
10-29-2014, 10:02 PM | #3 |
Grand Sorcerer
Posts: 12,166
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Have you looked at any of the guides people have made available on creatng ePubs?
See for instance these resources from Pablo: My Quick and Dirty ePub Tutorial (version 3 covering Sigil 0.7.1 now available, in pdf and ePub format) My Quick and Dirty ePub Tutorial in the Wiki |
10-29-2014, 10:58 PM | #4 |
Zealot
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Thank you. I went through the Sigil tutorial and user guide.
That helped a lot. I think I basically did what you suggested, just with different terms. I defined a new paragraph type in the css and then labeled the text in the forward under that type. I left everything the same in the definition except I added the indent. Thanks for your help. I will look into the other guides as well |
10-31-2014, 10:56 AM | #5 |
Guru
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Apply this stylesheet to the introduction chapter, or embed it in the header. It tells a standard paragraph to have no indent, but a paragraph following another paragraph to take one. Using em rather than an absolute value allows for reader-changed text size.
Note the spaces before and after + To keep the whole book using the same stylesheet, replace p with .p1 (or whatever) and use <p class="p1"> in that chapter. More work, though. p{ text-indent:0; } p + p { text-indent:1.8em; } Last edited by exaltedwombat; 10-31-2014 at 11:00 AM. |
Advert | |
|
11-02-2014, 04:45 PM | #6 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Otherwise, you will make very little, if any, forward progress. This will sound "grouchy" and it is not meant as such, but this forum is for how to make SIGIL do something; it's not how to make ePUBs, or how to code books. You should take some of the more fundamental questions to the Workshop forum, which is aimed more to beginners; most of your questions are really utterly unrelated to Sigil itself. Hitch |
|
11-02-2014, 10:11 PM | #7 |
Zealot
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Thanks Hitch. Yes, I know zero code. Thankfully, I have pieced together a nice looking ebook with lots of pics. That was thanks to the user guide, people generously helping me here and also the w3school you mentioned. That also helped with some css issues I was having. I will check the workshop forum as well.
|
11-03-2014, 04:05 PM | #8 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Also, even though it's a bit out of date, you may wish to consider buying Liz Castro's excellent "ePUB: Straight to the Point." It's a very good guide to the inner workings fo ePUBs; what does what, for example, like "what's an OPF," versus "What's an NCX," and the like. Granted, it invests a LOT of time in InDesign, but you can ignore that entire bit, and go straight for the ePUB-stuff. Hope that helps. Hitch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to adjust text from ebook | mdamsma | Kobo Reader | 15 | 03-31-2013 07:17 PM |
Touch Can't adjust line spacing | biscuitbear | Kobo Reader | 10 | 02-17-2012 01:59 PM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |
Could we adjust the time-out values? | Darqref | Feedback | 9 | 01-04-2010 02:43 PM |
possible to adjust margins? | la3541 | Bookeen | 1 | 06-10-2008 01:02 AM |