Skip navigation.

digital-nation

Blog-note d'un informaticien procrastinate...

Reset CSS

, , , , ,

Lorsque l'on commence une feuille de style pour un site, pour un widget, une application, nous faisons bien souvent une réinitalisation (ou RESET), remise à zéro etc. de tout ce qui est margin.
Ce qui donne approximativement ceci :
/* Remise à zéro des marges et renseignements linguistiques pour les hyperliens */
* { margin: 0; padding: 0; border: 0; }

(Un peu plus d'explication sur Alsacreations.com)
Ce qui donne parfois quelques discussions sur le forum aussi...

Toutefois le gourou Eric Meyer nous simplifie la chose en sortant son ultime Reset CSS :
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; }
/* remember to define focus styles! */
:focus {outline: 0; }
body { line-height: 1; color: black; background: white; }
ol, ul { list-style: none; }
/* tables still need 'cellspacing="0"' in the markup */
table { border-collapse: separate; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; }
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
blockquote, q { quotes: "" ""; }


Cela nous simplifiera la tâche par la suite... Tous les éléments sont remis à "zéro" et répondrons correctement au rendus qu'on leur donne.

(Billet tiré sur le blogmark de Franck Paul)

A blind CallOups !

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

December 2009
M T W T F S S
November 2009January 2010
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31