En internet existen muchos navegadores, y cada uno tiene diferentes estilos predeterminados tales como margenes, y padding. Esto dificulta el trabajo en muchos casos, por lo tanto crearemos estilos genéricos para que se visualice adecuadamente en todos.
Esta hoja de estilos reseteará los estilos y reescribirá los valores por defecto de algunas etiquetas, body, títulos, listas, formularios.
Para más información respecto a este tip pueden revisar el artículo original Starting with CSS: Revisited (Empezando con CSS).
Código :
/* =INITIAL v2.1, by Faruk Ates - www.kurafire.net Addendum by Robert Nyman - www.robertnyman.com */ /* Neutralize styling: Elements we want to clean out entirely: */ html, body, form, fieldset { margin: 0; padding: 0; font: 100%/120% Verdana, Arial, Helvetica, sans-serif; } /* Neutralize styling: Elements with a vertical margin: */ h1, h2, h3, h4, h5, h6, p, pre, blockquote, ul, ol, dl, address { margin: 1em 0; padding: 0; } /* Apply left margin: Only to the few elements that need it: */ li, dd, blockquote { margin-left: 1em; } /* Miscellaneous conveniences: */ form label { cursor: pointer; } fieldset { border: none; } /* Form field text-scaling */ input, select, textarea { font-size: 100%; }
Código :
.alignleft { text-align: left; }
.alignright { text-align: right; }
.floatleft { float: left; margin: 0 10px 10px 0; }
.floatright { float: right; margin: 0 0 10px 10px; }
.clearboth { clear: both; }
.clearleft { clear: left; }
.clearright { clear: right; }