Refix #222 and fix #247, #248

Using inline-block makes the whole thing easier and more stable.