View Single Post
Old 06-16-2010, 02:45 PM   #2
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
l'élément "p" a une margin automatique ; il faut la "remettre à zéro" pour pouvoir la définir dans les css. si tu définis une margin-bottom mais tu ne définis pas *aussi* la margin-top, tu ne pourras pas définir complètement l'espacement entre 2 paragraphs, parce qu'il y aura la margin-top par défaut de celui en dessous, en plus de ce que tu auras défini pour la margin-bottom.

il vaut donc mieux définir la margin sur les 4 côtés. tu peux utiliser le raccourci
p {margin: 0 0 0.5em 0;}
si tu veux définir uniquement la margin bottom. les chiffres correspondent à :
top right bottom left
(donc, tu commences en haut et tu fais le tour dans le sens des aiguilles d'une montre). aide mnémotechnique : TRouBLe

si tu veux la même margin en haut qu'en bas, et des 2 côtés, tu peux encore raccourcir ta règle :
{margin: 0.5em 0;}
1er chiffre pour top / bottom, 2ème pour right / left.

si tu veux la même partout, tu mets un seul chiffre:
p {margin: 0.5em;}
zelda_pinwheel is offline   Reply With Quote