In mobile.css
(the mobile version of Stack Overflow) there's a CSS rule:
.post-text :last-child {
margin-bottom: 0;
}
Currently this rule applies to every element in .post-text
that is the last child of its parent, even if the parent is not .post-text
. As you can see in the following screenshot, this also sets the bottom margin to zero on the last elements in each li
and so on:
When I add the child combinator (.post-text > :last-child
), everything works as expected:
(The answer in the screenshots is https://stackoverflow.com/a/53251603). This only applies to the mobile layout of SO, so you'll probably need to test this with a mobile user-agent.