I have not used CSS reset in my own projects, and I found the following article.
In fact, sometimes you don't need to follow the technical trend, you just need to know about it. Those things have some truth, but they are not necessarily suitable. Like CSS Sprite, if you feel it, you will know where it should be used and where it should not be used. If it is used everywhere, it becomes abuse.
Which of the following is the most commonly used by an individual in a project?
*{
Margin: 0px;
Padding: 0px;
}
I don't think it's necessary to use CSS reset. I feel a little bit superfluous.
There are no special requirements for IE 6. Basically, I gave up. Therefore, the size of several pixels does not have much impact. After all, users cannot view a page simultaneously with more than two browsers. As long as it looks exquisite, the alignment can be aligned.
When asked recently about using a CSS reset stylesheet, I readily
Admitted that I don't use them. I don't use them for my blog or for any
Project that I work on. admitting such can raise an eyebrow or two.
Reset stylesheets are definitely becoming commonplace-as you 'd expect CT
With companies like Yahoo
And industry leaders like Eric Meyer
Actively using them.
So, why haven'ti jumped on board?
What is a CSS reset?
In case you 've never heard of such a thing, a CSS reset is designed
To set a number of element styles to a specific baseline that creates
Consistency loss SS various browsers.
In the beginning
When the idea of a reset style was first introduced, it was very
Basic. It reset the margin and padding for all elements. The problem
With that was it caused havoc with elements that didn't want their
Margins or padding reset (namely, form elements ).
* { margin:0; padding:0; }
From there, people worked on adding to and fine-tuning the reset stylesheet to be more flexible and to reset more styles. The Meyer Reset
Is probably the finest culmination of this effort.
Eric Meyer's reset
Eric Meyer's reset took the concept of resetting margin and padding
And took it to a whole new level, stripping styles from a number
Elements, forcing you to think about what you wanted and add them back
In. list items wocould no longer have bullets, headings wocould no longer be
Bolded, and most elements wocould be stripped of their margin and
Padding, along with some other changes.
Working with nothing
The problem I 've had with these resets is that I then find myself
Declaring much more than I ever needed to just to get browsers back
Rendering things the way I want. As it turns out, I'm perfectly happy
With how a number of elements render by default. I like lists to have
Bullets and strong elements to have bolded text.
And I'm okay if the varous browsers show things slightly differently.
I'm okay if one browser displays an H1 a few pixels larger or smaller
Than other browsers. If one browser defaults to circle bullets and
Another to squares, that's usually not a problem. If it is, then I
Create a style that addresses that specific issue. I don't reset it back
To zero and then set it again to what I really want.
One of the principles I took away from the web standards community
Was the concept that pixel perfect precision setting ss the various
Rendering engines was impractical and a remnant of the table-based
Layouts of yesteryear. With CSS and progressive enhancement, it was okay
That things might look a little different from one browser to the next
Because of variations in what they supported.
Building up
With that said, the idea of developing a base CSS file that defines
Some common styles that I often want from project to project-like
Turning off margin and padding for form elements-is a good idea.
We're re seeing various CSS frameworks crop up such as blueprint
, Yui
And 960.gs
.
Each breaking the system down only to build it back up again. Each
Starts with a reset, then adds on typography and a grid system.
Each of those still seem like more than I need, even though none are
That large in size. blueprint is the heaviest at around 13kb
Uncompressed but also includes lots of extras like styles for Error
Messages and a print stylesheet.
Less is more
One of these days I'll put together my own base CSS or maybe I won't.
To date, I haven'tfelt myself being overly repetitive in the styles
That I set; and I haven' t thought to myself, "Oh, the hours I 'd save
Myself if only I had a reset stylesheet ."
So, while I have nothing against CSS reset stylesheets, I simply don't use them personally and I think that's okay.
Published sort l 17,200 8 categorized as HTML and cssshort URL: http://snook.ca/s/889