CSS global reset

When creating a style sheet from scratch it's a good thing to start with a global css reset to avoid problems with possible different presets of margin and padding properties in different browsers. The code (inspired by Andrew Krespanis's article) can look like this (notice the asterisk above h1): /* global reset */ * {padding: 0; margin: 0; } h1, h2, h3, h4, h5, h6, p, pre, blockquote, label, ul, ol, dl, fieldset, address { margin:0.6em 4%; } li, dd { margin-left: 4%; } fieldset { padding: .6em; }

No comments: