As vol7ron mentions, there is a p:last-of-type
rule that's zeroing out the margin on any p
that's the last within its parent in the context of a ul, ol
, for whatever reason:
.post-text ul p:last-of-type, .wmd-preview ul p:last-of-type, .post-text ol p:last-of-type, .wmd-preview ol p:last-of-type {
margin-bottom: 0;
}
One proposed fix is to just get rid of that rule altogether. It seems to have been put in place to prevent doubled vertical margins between the last p
and its parent li
, but CSS already has a mechanism for preventing that and it's called margin collapse. See my answer to this question on the main site (specifically, the last paragraph).
If the margins between the p
and its parent li
are not equal, and the rule was put in place to ensure the li
margin always takes precedence even if it is smaller than that of p
, the selector-list should be changed to:
.post-text ul > li > p:last-child, .wmd-preview ul > li > p:last-child, .post-text ol > li > p:last-child, .wmd-preview ol > li > p:last-child {
margin-bottom: 0;
}
to prevent the rule from affecting
p
elements whose margins would not be collapsing with the li
anyway, and
- other, completely unrelated
p
elements within the ul, ol
.