Text alignment within form elements

liunx

Guest
How can I align the text within a form element, such as a Text Box. I want the solution across the browsers.<br />
<br />
Thanx in advance,<br />
<br />
Anand<!--content-->tables. Simple as that.<br />
<br />
if you want a working example, let me know.<!--content-->are you sure he is not talking about aligning text inside a textbox? list making the text stay on the right or something. can you use align=right in a input tag?<!--content-->this worked in IE5/6, but hit some snags (as expected) in Netscape4.7<br />
Netscapes support for styles is less than expected. <br />
<br />
<html><br />
<head><br />
<title>Untitled</title><br />
<style><br />
textarea {text-align: right; font-family: veranda; color: red; font-size: 16}<br />
input {text-align: right; font-family: veranda; color: red; font-size: 16}<br />
</style><br />
</head><br />
<body><br />
<form><br />
<br><br><br><br />
<textarea rows=6 cols=36 ><br />
dskjflskjfd l<br />
gfhhfghhhh<br />
a fhfdghh<br />
afaf agkl g gdkhghjg hgagaga<br />
g fhfhghgh<br />
g ggaga hghghghghg<br />
</textarea><br />
<br><br><br><br />
<input type=text value="dskjfls"><br />
</form><br />
</body><br />
</html><!--content-->Another member, COBOLdinosaur, mentioned that netscape4.7 will not respond to styles when they are applied to form elements. Looks like your out of luck for that browser version.<!--content-->I tried the text-align property of the style sheets, as mentioned by Dr.Web. But it only works in IE. In netscape, the entire text-box gets aligned to the specified property.<br />
Is there no way out?<br />
<br />
Thanx for ur time,<br />
<br />
Anand<!--content-->I don't know of you read the rest of my post. Netscape 4.7 does not render the styles applied to form elements. Can you live without this in netscape? I can think of a time I have seen it in action anyway. What does your page look like, and what does this alignment achieve?<!--content-->I have a form that displays some pricing details. I wanted all the values(amount) to be right aligned withing the text boxes. I was so far using some leading white spaces in order to achieve this. I hope it can be achieved in some other simple & efficient manner.<br />
<br />
Thanx.<br />
Anand<!--content-->
 
Back
Top