thread215-1530910
If you want a single line break before each paragraph, but when preceded by a header, you want the paragraph to be on the next line (WITHOUT a BLANK line) use the adjacent selector method.
For example, when you want:
Header 1
Paragraph 1
Paragraph 2
...
Use the adjacent selector method. For example:
[blue]
h2+p {
margin-top: 0; /* this will only affect a paragraph that immediately follows h2 */
}
h2 {
display: inline; /* this is required. */
}
[/blue]
I added this new posting and linked it to an old thread to point out the need to have "display: inline;" within the h2 selector. The h selector defaults to display: block and it might take awhile to discover the display: inline requirement.
If you want a single line break before each paragraph, but when preceded by a header, you want the paragraph to be on the next line (WITHOUT a BLANK line) use the adjacent selector method.
For example, when you want:
Header 1
Paragraph 1
Paragraph 2
...
Use the adjacent selector method. For example:
[blue]
h2+p {
margin-top: 0; /* this will only affect a paragraph that immediately follows h2 */
}
h2 {
display: inline; /* this is required. */
}
[/blue]
I added this new posting and linked it to an old thread to point out the need to have "display: inline;" within the h2 selector. The h selector defaults to display: block and it might take awhile to discover the display: inline requirement.