Quote:
Originally Posted by nabsltd
Do you use padding so it doesn't collapse? I use margin-bottom: 0.1em; specifically because I want it to collapse if the next paragraph happens to have a larger top margin (like after a section break).
|
When I used to use space followed by a non-indented paragraph I used a bottom-margin. But the space can get lost if it's at the bottom of the page. So I switched to a padding-bottom and it kept the space so the space could wrap to the next page.
Now I use a 20% 2px line with space above and below for a section break because it looks better and uses less space.
I also use just <p> for most paragraphs as I don't need a class there. Here is the code I use for a section break.
CSS:
Code:
hr {
margin-top: 0.9em;
margin-right: 40%;
margin-bottom: 0.9em;
margin-left: 40%;
border-top: 2px solid;
}
hr + p, p.nonindent {
text-indent: 0;
}
Here is the HTML code for the section break.
HTML: