I noticed this in a recent post:

Narwhals! Narwhals! Swimming in the ocean!

It doesn't seem to happen here
It doesn't seem to happen here

  • But it does seem to happen here
    But it does seem to happen here

I first wrote this post up on MSO, but realised it didn't happen there!

  • I really wish kbd trimmed down the fat. The padding and borders don't tend to play nice with everything else.
    – badp
    Commented Nov 3, 2011 at 17:49
  • I saw the same thing in an answer of mine. I had to go back and add blank lines to space things out better. Commented Nov 3, 2011 at 20:22
  • Note: mobile is fine.
    – fredley
    Commented Nov 3, 2011 at 23:09
  • possible duplicate of Remove the vertical padding from the <kbd> tag Commented Nov 7, 2011 at 15:41
  • @MatthewRead That's definitely related, but not a duplicate, this is a different issue.
    – fredley
    Commented Nov 8, 2011 at 11:16
  • @fredley The reason the spacing is different between the two is because the line-height of the <p> and the <li> tags are different. As I noted here changing display attribute of the kbd pseudo-tag should solve the kdb tag cutting into to the line above.
    – Krazer
    Commented Oct 18, 2012 at 1:15

1 Answer 1


Took a while to get to this, but now it is done...

I've updated the styles of the kbd element to have display: inline-block;.

With you in the next build.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .