Aligning a text box's text centrally

liunx

Guest
does anyone know how to get the actual text of a text box aligned centrally? if you try to align the <input> tag like this<input type=text name=customername align=center> then it just aligns the whole text box to the middle of the page. I think it might have something to do with the 'style:' attribute?<br />
thanks for any help :)<br />
l8rz<!--content-->Yep, you want to use CSS to do this:<br />
<br />
<input type="text" style="text-align: center;"><!--content-->wow! i guess they dont call you supermod for nothing pyro! you're top... and mightily quick might i add :)<br />
cheers<br />
regards<!--content-->another thing.... is there a way to do the same thing with a drop down box? i tried the style="text-align: center"but it didn't work (i tried it on the <SELECT> tag and the <option> tag)....<!--content-->Adding the code to your <select> tag will work in browsers more compliant than IE, such as Mozilla, NN, and Opera... Yet another example of IE's inferiority... ;)<!--content-->
 
Back
Top