Aside

CSS Reset: Leveling the Playing Field (a bit)

Old Posts 2 Comments »

I’ve recently discovered a nice way to standardize the view I get between Internet Explorer and Firefox, which have a standard “stylesheet” built in to render websites.  The problem: both browsers use a different stylesheet, which can lead to inconsistancies between the same site on different browsers.

So, I’ve adopted a “CSS Reset” file.  What it does is basically clean the slate and neutralize the styles embedded into the browser, thus rendering IE and Firefox to a 90-99 percent similarity when viewing a page (there will always be bugs in IE’s website rendering, but for the most part pages show up fantasically).

The CSS Reset:

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
	margin:0;
	padding:0;
}
table {
	border-collapse:collapse;
	border-spacing:0;
}
fieldset,img {
	border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
	font-style:normal;
	font-weight:normal;
}
ol,ul {
	list-style:none;
}
caption,th {
	text-align:left;
}
h1,h2,h3,h4,h5,h6 {
	font-size:100%;
	font-weight:normal;
}
q:before,q:after {
	content:'';
}
abbr,acronym { border:0;
}

This is the Yahoo! UI Library Reset.css file, for those that care.

Comments have been disabled for this post.
Sort: Newest | Oldest

This is nice. I've seen it a few places. There's a nice CSS framework over at 960.gs, which is a 960-pixel wide grid that's useful for layout out websites, and it uses the CSS Reset framework, too. Thanks for sharing, Mitch.-Brad

I'm a big fan of Eric Meyer's version of this:http://meyerweb.com/eric/thoughts/2007/05/01/re...... actually used the Yahoo version as a starting point.

This is nice. I've seen it a few places. There's a nice CSS framework over at 960.gs, which is a 960-pixel wide grid that's useful for layout out websites, and it uses the CSS Reset framework, too. Thanks for sharing, Mitch.

-Brad

I'm a big fan of Eric Meyer's version of this:
http://meyerweb.com/eric/thoughts/2007/05/01/re...

He actually used the Yahoo version as a starting point.