Missalignment with inline-block (other elements pushed down)

simon picture simon · Nov 14, 2011 · Viewed 28.4k times · Source

I'm trying to align small boxes in a row. These boxes have something like 2 elements in each. In some cases, the first element is so "much" text, that it splits into 2 lines. If this happens, all other blocks in this special line are shown below.

Long story short, here is the example: http://jsfiddle.net/PMRQ5/

If you resize the HTML field, you can see what I mean. Can somebody help?

Answer

JNDPNT picture JNDPNT · Nov 14, 2011

http://jsfiddle.net/PMRQ5/1/

Add vertical-align: top or vertical-align: bottom to the box, depends on what you want.