If I have custom content, for example:
<p>my paragraph</p> <ul> <li>item1</li> <li>item2</li> </ul>
This displays a paragraph break between the end of the paragraph and the list as follows:
my paragraph
I know that I can get rid of the space in my CSS by setting margin-top on the UL tag and the bottom edge on the p tag, but is there any way to do this without affecting the margins between the actual paragraphs.
Content is created by users with a limited set of available tags and without fonts, sizes ... available, so all formatting should be done in CSS, if possible, without having to put classes in tags.
EDIT: I must know, because CSS works with CSS collapse, I could usually set
p { margin-bottom:0; } li { margin-top:0; }
Separation would be correct in both cases, since the margin-top property on the p tag would still be 1, but I already set margin-top to 0.2em for a smaller gap between h2 and p-tags.
PeteT source share