Vertical alignment of multiple elements compatible with many browsers?
Posted on 2007-11-15
I have three things I'd like to align vertically, but not using tables. Just using css. Is there a workaround/hack/solution that is compatible with the major browsers (and versions)?
<h1>This is a title</h1>
<input type="text" name="" value="a text box">
<input type="image" src="sample.gif" name="">
The text box is a bit larger than the <h1> element, and the image, is a bit larger than the textbox, thus, the desire to have them all vertically aligned in the middle of a div that has a height of 100px.