CSS
Déclaration CSS : sélecteur { propriété : valeur ; }
/* Commentaire */
- Sélecteurs
- Sélecteur simple : balise
- Sélecteur multiple : sel1, sel2
- Sélecteur universel : *
- Sélecteur de classe : .classe, balise.classe
- Sélecteur d'identifiant : #identifiant, balise#identifiant
- Sélecteur contextuel : sel1 sel2
- Pseudo-élément : balise:first-line, balise:first-letter
- Pseudo-classes : a:link, a:visited, a:hover, a:active
- Valeurs
- Longueurs
- %
- em, ex
- px
- mm, cm, in, pt, pc
- Couleurs
- aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow
- rgb(255,255,255)
- rgb(100%,100%,100%)
- rgba(255,255,255,100%)
- #FFFFFF
- Propriétés (Remarque : | signifie OU)
- Mise en forme du texte
- font-family: serif | sans-serif | cursive | fantasy | monospace | nom_police
- font-size: taille
- font-style: italic | oblique | normal
- font-variant: normal | small-caps
- font-weight: normal | bold
- line-height: taille
- text-decoration: none | underline | overline | blink | line-through
- letter-spacing: taille
- word-spacing: taille
- Alignement et indentation
- text-align: left | right | center | justify
- vertical-align: super | sub | baseline | top | bottom
- text-indent: taille
- Listes
- list-style-type: none | disc | circle | square | decimal | upper-alpha | lower-alpha | upper-roman | lower-roman
- list-style-image: url(chemin/monimage.png)
- Bordures
- border: width style color
- border-collapse: collapse
- border-style: none | dotted | dashed | solid | double | groove | ridge | inset | outset
- border-color: couleur
- border-width: taille
- Couleurs et arrière-plan
- color: couleur
- background-color: couleur
- background-image: url(chemin/monimage.png)
- Boîtes
- width: taille | auto
- height: taille | auto
- margin-top, margin-right, margin-bottom, margin-left: taille | auto
- margin: taille | auto
- padding-top, padding-right, padding-bottom, padding-left: taille
- padding: taille
- overflow: visible | hidden | scroll | auto
- display: block | inline | none
- Flottement et positionnement
- float: left | right | none
- clear: left | right | both | none
- position: static | relative | absolute | fixed
- top, right, bottom, left: longueur | auto
- Visibilité
- visibility: visible | hidden
- Tables
- caption-side: top | bottom
- border-collapse: collapse | separate
- empty-cells: show | hide