View Single Post
Old 06-23-2013, 09:04 AM   #6
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by santosha View Post
Hi,

I'm wondering if anyone could comment on using a so-called "style reset" to remove any default margins and paddings an e-reader may impose on the reading of the ebook automatically.

Example (from Guido's Guide):

Code:
html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, pre, table, th, td, tr { margin: 0; padding: 0; }
Is it accurate to use something like this?
If you want to remove margins and paddings from all selectors, then you should use the following code instead of the above posted:

Code:
* {
   margin: 0;
   padding: 0;
}
Here you will be using the "universal selector" ( * ):

http://meyerweb.com/eric/articles/webrev/200006a.html

http://reference.sitepoint.com/css/universalselector

And is safe to use it. Of course, after that, if you want an item to have margins, you will have to indicate it in your style sheet.

Regards
Rubén
RbnJrg is offline   Reply With Quote