09-12-2012, 01:41 AM | #16 |
Resident Curmudgeon
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You cannot use a reset.css to change the formatting of a given eBook. You would have to know the classes used in the eBooks and set them up appropriately. Sure, you can guess and maybe get it partially correct. But if you don't, it could look worse. The best thing to do is to look at the XML to see the used classes and then edit the CSS to do it the way you want. In most cases, it's not that difficult.
|
09-12-2012, 07:03 AM | #17 |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Also, in the case of a reset.css for the web, the differences between all the various browsers are fairly well known/documented. Not so for the various reading devices/apps. You don't know what you don't know. A reader might be able to come up with a basic "reset" css for their own device; but then again... I think most people who create a lot of ebooks (or tweak a lot of their own) already do this. They just naturally develop their own template, or css style—which might prove quite useless to anyone else.
Last edited by DiapDealer; 09-12-2012 at 09:11 AM. |
09-12-2012, 12:14 PM | #18 |
Resident Curmudgeon
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What I do is take CSS code I might use and put it in a separate text file. Then if I'm editing an ePub, I can copy the already made code.
The best thing to do is create a reset.css and use that as the template. Then copy from it as needed to fix up the ePub. Then you'll make sure you have the correct classes. if your reset.css has a class called noindent and the ePub you are working on has the same class called nonindent, you can easily fix things. But if you were to replace the existing CSS with your reset CSS, every instance of nonindent would fail to render properly. |
09-18-2012, 06:21 AM | #19 |
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
the only time i've actually found it useful to include a reset.css was for fixed layout epubs (for iOS), and even then i've only used it ever to obliterate the padding and margins for block elements. it's rudimentary, but i was using something like
html,body,div,img,p,a,ul,li {margin:0;padding:0;} started using originally because i was looking for a way to reset the default margins on the iOS. if OP's looking for a really comprehensive reset, there's no reason not just to grab one from wp or similar. |
09-25-2012, 09:40 AM | #20 | |
Bemused by possibilities
Posts: 58
Karma: 480244
Join Date: Jul 2012
Device: iPad3, Kobo
|
Quote:
This is really useful information, thanks. |
|
09-25-2012, 09:56 AM | #21 |
Bemused by possibilities
Posts: 58
Karma: 480244
Join Date: Jul 2012
Device: iPad3, Kobo
|
I am just testing out InDesign CS6 and it automatically includes a streamlined CSS reset when exported to ePub. This is the code:
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, p, pre, code, blockquote { margin:0; padding:0; border-width:0; } td, th { border-style:solid; border-width:1px; } table { border-collapse:collapse; } li { display:block; } I have also seen this reset code in ePubs: html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, ol, ul, li, pre, a, cite, code, del, dfn, em, font, img, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } Yes, it doesn't work on all readers (engines), but it does make a difference on quite a few, especially if you start using background images on headers, etc. and use the second example. My view is it makes the "playing field" more predictable! |
09-25-2012, 03:02 PM | #22 |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I rarely (if ever) leave anything unstyled in my ePubs anyway, so a reset seems like a waste of time (strictly speaking for myself). But I can see how they might be handy for someone who isn't going to take the hands-on, build-every-ePub-from-scratch approach.
|
09-26-2012, 06:27 PM | #23 |
Bemused by possibilities
Posts: 58
Karma: 480244
Join Date: Jul 2012
Device: iPad3, Kobo
|
Do you work from Word or from HTML, InDesign?
|
Tags |
css, ebooks, epub, reset, reset.css |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
epub CSS versus "Regular" CSS | konrad | ePub | 4 | 02-18-2011 09:29 AM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |
PRS-300 Have to reset often | dura | Sony Reader | 0 | 07-07-2010 04:14 AM |
Reset button not working and ebooks being corrupted. | cipicip | Bookeen | 15 | 03-27-2008 02:32 PM |