We are a web design con­sul­tancy in San Diego, Cal­i­for­nia. KING­desk can help your orga­ni­za­tion develop and imple­ment online strate­gies. We pub­lish free arti­cles fea­tur­ing best prac­tices for web design. For per­son­al­ized con­sul­ta­tion or web design ser­vices, please con­tact us.

featured article

CSS Reset - Refreshed

author: Jeffrey D. King

published: December 21, 2009

updated: July 5, 2010

It is help­ful when design­ing a web page for cross-​​browser con­sis­tency, to cre­ate a com­mon foun­da­tion. Eric Meyer’s CSS Reset is a valu­able tool to can­cel out con­flict­ing aspects of default browser stylesheets. KING­desk Web Design has used this file on every web­site we have devel­oped in the past 2 years.

As we have begun imple­ment­ing new HTML5 ele­ments into KINGdesk’s designs, a new bit of code is required. HTML4′s defined behav­ior for han­dling of unknown ele­ments requires inline treat­ment. This requires use of HTML5 block level ele­ments (such as <section>, <article>, <header>, and <footer>) be explic­itly defined as such for proper han­dling… for a com­mon foun­da­tion. Addi­tion­ally, many new ele­ments (both inline and block level) should rea­son­ably be included in the ini­tial CSS Reset style clear­ing rule. As such, I am now using the fol­low­ing mod­i­fied version:


/* v1.2 | 20100218 */

/* Eric Meyer's original CSS Reset is found at
   meyerweb.com/eric/tools/css/reset/ */

/* This version's permalink is
   kingdesk.com/articles/css-reset/ */


html, body, div, span, applet, object, br,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
section, article, aside, hgroup, header,
footer, nav, dialog, figure, menu,
video, audio, mark, time, canvas, details {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	%;
	vertical-align: baseline;
	background: transparent;
	}
section, article, aside, hgroup, header,
footer, nav, dialog, figure, figcaption {
	display: block;
	}
body {
	line-;
	}
ol, ul {
	list-style: none;
	}
blockquote, q {
	quotes: none;
	}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
	}
:focus { /* remember to define focus styles! */
	outline: 0;
	}
ins { /* remember to highlight inserts somehow! */
	text-decoration: none;
	}
del {
	text-decoration: line-through;
	}
table { /* markup tables with 'cellspacing="0"' */
	border-collapse: collapse;
	border-spacing: 0;
	}

Pur­pose­fully excluded from the above CSS reset are the fol­low­ing HTML5 elements:

  • embed
  • progress
  • meter
  • ruby
  • rt
  • rp
  • com­mand
  • datal­ist
  • key­gen
  • out­put

2 comments • permalink

spacer

About the Author

Jef­frey D. King is a web designer and con­sul­tant in San Diego. Jeff is pas­sion­ate about the inter­sec­tion of busi­ness and the inter­net. As a stu­dent of design, usabil­ity, brand­ing, and entre­pre­neur­ial strate­gies, he can help your orga­ni­za­tion achieve online success.
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.