css vertically align text in input elements?
August 9, 2007 11:46 AM
Subscribe
I'm such a horrible n00b. How do I use css to vertically align the text in an input textbox with the label on the corresponding submit button?
I want the word "default" to vertically align with the word "search" in the following code (which it doesn't in firefox, but seems to in ie):
(imagine angly brackets instead of [])
[style]
input.txt {
vertical-align: middle;
color:#888;
height: 19px;
font: 9px verdana;
}
input.btn {
vertical-align: middle;
height: 19px;
font: 9px verdana;
background-color:#f2f2f2;
border:1px solid #aaaaaa;
}
[/style]
[input name="textbox" class="txt" value="default" maxlength="60" size="30" class="form" type="text"]
[input name="submitSearch" class="btn" value="search" type="submit"]
posted by juv3nal to computers & internet (10 comments total)
sometimes "line-height" on the text can help though...
posted by drjimmy11 at 12:03 PM on August 9, 2007