Try the following adjustment to your CSS:
pre > code {
white-space: pre;
margin-top: -1.00em;
display: block;
}
You can also leave out:
pre > code > strong:first-of-type { margin-top: 10px; } /** not needed **/
Fiddle: http://jsfiddle.net/audetwebdesign/WscKu/2/
Tested in Firefox on Windows 7, should work fine, basic CSS 2.1, nothing exotic.
How This Works
For visual formatting of your HTML source code, you have a line-feed after <pre><code>
,
which creates a single character line in your rendered content, which will be 1.00em tall.
You can compensate by setting the top margin to the <code>
block to -1.00em. However, for top/bottom margins to work, you need to set display: block
to the <code>
element.