CSS Débutant .com
mémo
Votre mémo pour favoris
- Les styles de police
- Les styles du texte
- Les arrière-plans
- Les marges
- Les bords et les "enrobages"
- Les listes
Les styles de police (Voir le chapitre)
font-family
<nom> ou <famille>
police précise (Arial, Times, Helvetica...) ou
famille (serif, sans-serif, cursive, fantasy, monospace)
H3 {font-family: Arial}
font-style
normal ou italique ou oblique
H3 {font-style: italic}
font-weight
normal ou bold ou bolder ou lighter ou valeur numérique soit
(100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900)
P {font-weight: bold}
font-size
xx-small ou x-small ou small ou médium ou large ou x-large ou xx-large
ou larger ou smaller
ou taille précise en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
P {font-size: 12pt}
font-variant
normal ou small-caps
P {font-variant: small-caps}
font
P {font: bold italic}
Les styles du texte (Voir le chapitre)
text-align
left ou center ou right
H1 {text-align: center}
text-indent
souvent utilisé avec <P>, n'oubliez pas dans ce cas </P>.
spécifié en inches (in) ou en centimètres (cm) ou en pixels (px)
P {text-indent: 1cm}
text-decoration
blink ou underline ou line-through ou overline ou none
A:visited {text-decoration: blink}
text-transform
uppercase (met les caractères en majuscules) ou
lowercase (met les caractères en minuscules) ou
capitalize (met le premier caractère en majuscule)
P {text-transform: uppercase}
color
par exemple en hexadécimal
H3 {color: #000080}
word-spacing
en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
P {word-spacing: 5pt}
letter-spacing
spécifié en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
P {letter-spacing: 2pt}
line-height
en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
P {line-height: 10pt}
width
en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
H1 {width: 200px}
height
en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
H1 {heigh: 100px}
white-space
normal ou pre ou nowrap
PRE {white-space: pre}
Les arrière-plans (Voir le chapitre)
background-color
couleur (par exemple en hexadécimal) ou transparent
H1 {background-color: #000000}
background-image
URL de l'image
BODY {background-image: image.gif}
background-repeat
repeat ou no-repeat ou repeat-x (x = n:ombre de répétitions horizontales) ou
repeat-y (y = nombre de répétitions verticales
P {background-image: image.gif; background-repeat: repeat-4}
background-attachment
scroll ou fixed
BODY {background-image: image.gif; background-attachement: fixed}
background-position
supérieur gauche de la fenêtre
{1, 2}
{top ou center ou bottom , left ou center ou right}
ou en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
BODY {background-image: img.gif; background-position: right top}
background
P {background: image.gif fixed repeat}
Les marges (Voir le chapitre)
margin-top
en unité de longueur ou auto
{ margin-top: 5px }
margin-right
en unité de longueur ou auto
{ margin-right: 5px }
margin-bottom
en unité de longueur ou auto
{ margin-bottom: 5px }
margin-left
en unité de longueur ou auto
{ margin-left: 5px }
margin
Les bords et les "enrobages" (Voir le chapitre)
border-top-width
thin ou medium ou thick ou spécifié par l'auteur
H3 {border-top-width: thin}
border-right-width
thin ou medium ou thick ou spécifié par l'auteur
H3 {border-ri:ght-width: medium}
border-bottom-width
thin ou medium ou thick ou spécifié par l'auteur
H3 {border-bottom-width: thick}
border-left-width
thin ou medium ou thick ou spécifié par l'auteur
H3 {border-left-width: 0.5cm}
border-width
border-color
H3 {border-color: yellow}
border-style
none ou solid ou dotted ou dashed ou double
ou groove ou ridge ou inset ou outset
{border-style: solid dashed}
border
padding-top
en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
H3 {padding-top: 3px}
padding-right
en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
H3 {padding-right: 3px}
padding-bottom
en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
H3 {padding-bottom: 3px}
padding-left
en points (pt), inches (in), centimètres (cm), pixels (px)
ou pourcentage (%)
H3 {padding-left: 3px}
padding
Les listes (Voir le chapitre)
list-style-type
disc ou circle ou square
:decimal ou lower-roman ou upper-roman ou lower-alpha ou upper-alpha
OL {list-style-type: square}
list-style-image
url ou none
OL {list-style-image: image.gif}
list-style-position
inside ou outside
UL {list-style-position: inside}
list-style
Débuter en CSS :
- Introduction au CSS
- CSS ou juste HTML
- Syntaxe du CSS et héritage
- Lien entre HTML et CSS
- Les classes en CSS
- Les id en CSS
- Les balises DIV et SPAN en CSS
- Conclusion
Comprendre et coder en CSS
- Les marges (margins)
- Les padding
- Les textes [1] - [2]
- Les polices
- Ancres, Liens, Pseudo Classes
- Fond d'une page (background)
- Les Bordures
- Les listes
- Largeur et Hauteur
- Classification
- Positionnement des éléments
- Pseudo Elements
- Mémo complet
Tutoriels
- Manifique bouton en CSS
- Créer des coins arrondis
- Générer des coins arrondis
- Ne pas souligner les liens
- Exemple pas à pas
- Formulaire en CSS
- Générer du CSS facilement
- Liens utiles à connaitre...

