Here is jsfiddle with live demo.
I want to make padding at top and at bottom of the blockquote to be equal (0.5em to be precise).
At first look, basic and trivial task, but I faced with a problem - collapsing margins/paddings (if I understand it right) at the bottom of blockquote.
I found some workarounds (like adding a 1px border or padding), but it surely very dirty.
So, the question: Is there a good way to make padding at top and at bottom of the blockquotes to be equal, like shown in the image?
<style>
body { width: 400px; }
p { margin-top: 0; margin-bottom: 0.5em; }
blockquote {
background-color: antiquewhite;
padding-top: 0.5em; padding-bottom: 0.5em;
margin-top: 0; margin-bottom: 0.5em;
}
/* Two workarounds */
/*
blockquote { padding-bottom: 1px; }
blockquote { padding-bottom: 0; border-bottom: 1px solid antiquewhite; }
*/
/* Will not work, due to padding/margin collapsing, as I understand */
blockquote { padding-bottom: 0; }
</style>
<p>Some text before blockquotes</p>
<blockquote>
<p><strong>1st blockquote</strong></p>
<p>1st paragraph. Foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo.</p>
<p>2nd paragraph. Bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar.</p>
</blockquote>
<blockquote>
<p><strong>2nd blockquote</strong></p>
<p>1st paragraph. Foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo.</p>
<p>2nd paragraph. Bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar.</p>
</blockquote>
<p>Some text after blockquotes</p>