Style sheet normalizing.css

I don’t understand why we should need a normalize.css file. is it a kind of default style sheet for all browsers? I mean wouldn’t it be annoying changing everytime one property like in the example? Setting margin to 10px if you want space around the content simply because normalize.css sets margin to 0.

normalize.css keeps your HTML elements looking the same across the different browsers. I don’t know what you mean about changing every time; normalize sets the body margin to 0 but you only need to override it once.

Ah maybe you are saying that everyone would want to have a margin for the body element so why would normalize set it to 0 in the first place just to have everyone override it anyway? I’m not sure if that’s the case and for those folks who don’t set a body margin, it might be weird that their body elements have a margin on some browsers but not others.

so is normalized.css needed or not needed? is it just ones personal preference I suppose?

You don’t need to do normalization but you’ll want to… Dealing with different defaults later can be a pain since properties are often inherited so it’s better to use a good normalization script when setting up a new project. The people maintaining them usually know what they are doing.

okay cool and this site is still the best place to normalize or only place? Normalize.css: Make browsers render all elements more consistently.

Good point. Last commit was four years ago… AFAIK you don’t do CSS resetting anymore but I don’t know if there’s a more actively maintained normalizing project.

it works at the moment so I suppose if it isn’t broke, don’t break it, keep using it lolol

Yeah, the point in normalization is to have a consistent starting point regardless of which browser is being used.

That said, it is just a style sheet and you are free to adjust it, or even make your own. There are many out there created by people just dedicating time to this specific issue, which they then let other people have access to. There is no one shoe fits all.

Resets are the same thing, and can also be applied to another stylesheet you just copy into your own projects, that has settings you prefer. The issue normalization is trying to resolve from resets are when using resets you are simply stripping a lot of default properties, like padding and margin, back to zero. Which is then applied again in your main stylesheet(s), so why strip them just to add back later? For now you can do whatever you prefer but when working in a group setting people like things consistent. Everyone linking to a standard normalization or reset file allows for that consistent starting point.

okay cool thank you I appreciate it