Browsers usually set different default styles for elements. Users can also override the defaults using custom stylesheets.
I often override these default styles using my own styles, e.g.:
* {padding:0; margin:0; }
However, I wish to respect the default stylesheet for certain element attributes, e.g. the <body>
's default padding and margin. I tried:
* { padding:0; margin:0; }
body { padding:default; margin:default; }
But it doesn't work. Neither does initial
.
Is there a way to solve this problem by selecting all elements but excluding <body>
?