I am currently working with a text box that has a background. I was wondering if it is possible to center the text (vertically) inside the text box.
important : it is ideally concentrated in firefox. Only IE for some reason writes too much. I tried the line-height, margins and margins. Nothing works. Any ideas?
EDIT: This is my current CSS. I have to say that I tried the margin-top method and it did not work for me. Also, as I mentioned, this is for IE only. I have special IE style sheets so don't worry.
.textValue { color: black; font-size: 12px; font-family: David, sans-serif; } input { width: 110px; padding: 0 2px; padding-right: 4px; height: 20px; border: solid 1px white; margin-bottom: 0px; background: url(../images/contactTextBg.png) no-repeat top right; } label { float: right; margin-left: 5px; font-size: 13px; }
For IE, I have the following:
.textValue { font-size: 14px; }
as for HTML:
<tr> <td><label for="name">name</label></td> <td><input type="text" name="name" id="name" class="textValue" value="" /></td> </tr>
Thanks Amit
html css textbox
Amit
source share