Reseteaza stilurile CSS

Urmatorul cod CSS reseteaza sau seteaza toate tag-urile intr-o pagina HTML.
Browserele au valori diferite de padding sau margin si asta poate cauza probleme la afisarea elementelor in pagina.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
html, body, div, span, applet, object, iframe, 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, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
    background: transparent;
}

Trebuie pus exact la inceputul fisierului ce contine CSS-ul tau.

If you liked this post
you can buy me a beer

07. November 2008 by Sorin
Categories: CSS | 3 comments

Comments (3)

  1. stiam de ala dar inca nu l-am incercat.. desi tot ma gandesc sa trec pe resetul ala :D
    oricum mersi de link si ca mi-ai adus aminte :P

  2. oh this is an old trick of course

Leave a Reply

Required fields are marked *

*


Social Widgets powered by AB-WebLog.com.