View Single Post
Old 08-05-2013, 02:57 PM   #48
Anak
Guru
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Quote:
Originally Posted by DNSB View Post
I've always had the impression that margin: 0; is simply a shorthand equivalent to margin: 0 0 0 0; so there should be no difference between using either form.

So now, I will have to fiddle with the css file to see if I can see any differences. Who needs to read ebooks when you can have more fun playing with the ereader?
That's what I thought too, but I've learned it by doing it. Or it is the !important rule that only works on that specific piece of code. A !important shorthand rule overrules other shorthand rules but does not influence non shorthand code. Trial-and-error.

Reading? Can't even remember the last time.

Did some further testing and !important rules only work on that specific code.

margin:0 !important; sets al margins to 0 (obvious)
but does not affect, more precise settings of the same selector:

margin:2em 1em 2em 1em;
margin:2em 1em;
margin-top: 5%;
margin-bottom: 2em;
margin-left: 1em;
margin-right: 24px;

but does overrule
margin:2em; (margins are set to 0)

Which is good as you probably don't want to change the original layout completely.

Last edited by Anak; 08-06-2013 at 05:54 AM.
Anak is offline   Reply With Quote