Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Master Reset - Disadvantages?

Tags:

css

I'm not too sure if it is refered to as "Master Reset" but you'll know what I mean.

Ive been using

*{
      padding: 0;
      margin: 0;
    }

With no real problems that I have noticed but ive heard people say that its bad practice to use something like that. So ive looked into reset stylesheets and found this which seems good. But im not sure if its worth using that if there are no problems with using *{foo:bar;}

like image 416
Ben Shelock Avatar asked Aug 22 '09 16:08

Ben Shelock


2 Answers

I hear some people say that in some browsers it messes up with the styling of form inputs. I used to use this, until I stumbled across the meyer reset, which just seemed like a safer, proven approach.

like image 115
LorenVS Avatar answered Oct 09 '22 11:10

LorenVS


There are arguments for and against CSS resets. The general idea is that by "zeroing-out" all properties you're given a consistently blank canvas across all browsers to which you can apply your custom styles.

The problem with using a reset is that everything will be reset - so, you need to specify custom styles for everything, or at least everything you're going to be utilising within your site.

Read Snook's view: http://snook.ca/archives/html_and_css/no_css_reset/

I often see sites with odd styles applied in commenting systems. For example, I might leave a comment with a <code> tag and because the site uses a css-reset the code tag has no special styling, making it visually pointless. This is only a problem with those full-on resets, like Meyers or Yahoos. Developers forget to apply styles to reset elements... Your flat-reset, while simple, has other ramifications.

In my opinion it's better to have no reset and just style each element on top of default styles offered by the browser.

like image 39
James Avatar answered Oct 09 '22 12:10

James