View Single Post
Old 06-23-2013, 03:00 PM   #8
santosha
Novice
santosha began at the beginning.
 
santosha's Avatar
 
Posts: 14
Karma: 10
Join Date: Jun 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by RbnJrg View Post
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
Thanks Rubén for your input!

I guess my question is also -- do I want to use it? What's your opinion? It was recommended on a blog guide and it does seem like a good idea if it does indeed create positive results rather than compromise compatibility.

But my second question is then: If KindleGen, for example, converts CSS styling (such as the reset) to mobi-equivalents (where they exist), how will such a "style reset" convert over to .mobi?

Also, if I as you say might want to have an item with margins, can I override the style reset later in the CSS? I.e. does a following, specified style property override the universal selector?

Thanks a lot for your help!
santosha is offline   Reply With Quote