Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-12-2012, 01:41 AM   #16
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,279
Karma: 18149666
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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.
JSWolf is offline   Reply With Quote
Old 09-12-2012, 07:03 AM   #17
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,120
Karma: 40942904
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.
DiapDealer is online now   Reply With Quote
Old 09-12-2012, 12:14 PM   #18
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,279
Karma: 18149666
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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.
JSWolf is offline   Reply With Quote
Old 09-18-2012, 06:21 AM   #19
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 162
Karma: 86115
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.
mzmm is offline   Reply With Quote
Old 09-25-2012, 09:40 AM   #20
SusanM
Bemused by possibilities
SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.
 
SusanM's Avatar
 
Posts: 58
Karma: 480244
Join Date: Jul 2012
Device: iPad3, Kobo
Quote:
Originally Posted by Jim Lester View Post
It's a term from web designers - it's called 'reset' because by including it you were 'resetting' the styles that were different between different browsers to a common set of stylings, however it's come to be a basic template that designers then elaborate on.

Google came up with this as a history primer which looks close to right:
http://sixrevisions.com/css/the-history-of-css-resets/

I don't know think there's an equivalent for ePub rendering space, because as the OP is starting to realize, nobody's really considered this. Likely because the various renderers (even those using the same rendering engine) vary so widely in what they do, and we (the vendors) haven't published much information about what we are doing. As a for instance if you look at the same EPUB on a Nook Color, a Sony T1, and in ADE 1.8 - you will find all three different renderings:

1.) Unless the font is embedded - the font used will be different (and even then it may be overridden on the NC)
2.) EInk vs Color makes a big difference, that the browser reset CSS authors haven't thought about.
2.) Linespacing,font size, margin and other override settings are available on the T1 and NC, but not in ADE (well font size is).
Jim,

This is really useful information, thanks.
SusanM is offline   Reply With Quote
Old 09-25-2012, 09:56 AM   #21
SusanM
Bemused by possibilities
SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.
 
SusanM's Avatar
 
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!
SusanM is offline   Reply With Quote
Old 09-25-2012, 03:02 PM   #22
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,120
Karma: 40942904
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.
DiapDealer is online now   Reply With Quote
Old 09-26-2012, 06:27 PM   #23
SusanM
Bemused by possibilities
SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.
 
SusanM's Avatar
 
Posts: 58
Karma: 480244
Join Date: Jul 2012
Device: iPad3, Kobo
Quote:
Originally Posted by DiapDealer View Post
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.
Do you work from Word or from HTML, InDesign?
SusanM is offline   Reply With Quote
Reply

Tags
css, ebooks, epub, reset, reset.css

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 10:33 AM.


MobileRead.com is a privately owned, operated and funded community.