CSS

CSS Reset

CSS Reset é uma prática muito utilizada para corrigir problemas de renderização dos códigos HTML, pelos diversos browsers disponíveis no mercado.

Cada navegador (browser) define valores padrões para algumas tags html.

Para evitar este tipo de problema, alguns desenvolvedores utilizam CSS Reset, que nada mais é, do que uma forma de zerar estes valores pré-definidos.

Segue um exemplo simples:

<style type="text/css">
html, body, ul, ol, li, form, fieldset, legend
{
	margin: 0;
	padding: 0;
}
 
h1, h2, h3, h4, h5, h6, p { margin-top: 0; }
fieldset, img { border: 0; }
legend { color: #000; }
 
input, textarea, select, button
{
	font-size: 110%;
	line-height: 1.1;
	font-family: helvetica, arial, sans-serif;
}
 
button
{
	width: auto;
	overflow: visible;
}
 
table
{
	border-collapse: collapse;
	border-spacing: 0;
}
 
caption, th, td
{
	text-align: left;
	vertical-align: top;
	font-weight: normal;
}
 
li { list-style: none; }
 
abbr, acronym
{
	border-bottom: .1em dotted;
	cursor: help;
}
 
sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }
 
pre, code
{
	font-family: "Courier New", monospace, serif;
	font-size: 100%;
	line-height: 1.2;
}
</style>

Mais exemplos acesse aqui.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *