To align div horizontally, one solution is to use css float property. But a better solution is to to use CSS display:inline-block on all divs which needs to be aligned horizontally and place them in some container div.

Here is are some examples.

inline-block divs with default vertical-align

Default vertical-align value is baseline. Note that here baseline of all divs are aligned to baseline of parent div.