horizontal align in a div

Posted by Jason94 on Stack Overflow See other posts from Stack Overflow or by Jason94
Published on 2010-05-11T11:06:51Z Indexed on 2010/05/11 11:14 UTC
Read the original article Hit count: 204

Filed under:

I have a box like this:

<div id="selectBox">
Select:
<select>
<option>1</option>
<option>2</option>
</select>
</div>

How do i get them aligned so that they are horizontal in the middle of each other, the baseline of the "Select" text and the content of the select box ("1").(and not the box itself).

I can solv this by wrapping a table around them and make two cells but i feel that method is very crude.

© Stack Overflow or respective owner

Related posts about css