Quote:
Originally Posted by AlanHK
I've see a few books using this CSS:
p{margin:0;text-align:justify;}
p+p{text-indent:1.4em;}
|
I was using that but it's too big of a hammer, even for me. There are times when I want an indent but the previous thing isn't a p, for example, a figure, or a div around whatever, or a blockquote. So now I use
Code:
dl + p,
hr + p,
header + p,
p:first-child {
margin-top: 1.0em;
text-indent: 0em;
}
body p {
margin: 0;
padding: 0;
text-indent: 2em;
}
(I like big fat indents.)
In other words, only specify where you don't want an indent. Also, the logic this way is clearer; saying "no indent for p, but then indent a p when it's after a p" can be confusing for someone looking at your css. With coding/programming it's usually better to make things clear and avoid clever tricks that could be misunderstood or hard to understand.