I am working on a legacy project that has CSS Reset with *{ margin:0; padding:0 } applied to everything. Now, my new code doesn't need that as it relies on Normalize.css. This hasn't been much of a problem but at some places I need to use both styles.
How do I unreset my CSS? I have been able to do *{margin:auto} which works fine. The same isn't true about padding. Is there an equivalent way to reset the padding. How do you go about solving this?
autois not a valid value forpaddingproperty, the only thing you can do is take outpadding: 0;from the*declaration, else simply assignpaddingto respective property block.If you remove
padding: 0;from* {}than browser will apply default styles to your elements which will give you unexpected cross browser positioning offsets by few pixels, so it is better to assignpadding: 0;using*and than if you want to override the padding, simply use another rule like