View Full Version : Aligning text in a button

05-27-2004, 02:44 PM
Hi I'm using some java buttons(submit buttons) for a website I'm doing. Some of them have really long titles and som dont but the problem is the alignment is all screwed up. I want to align the text inside the button to the left. The reason is cause Im using white buttons that match the background and it looks bad to have a bunch of text stacked and not all having the text ligned up on the side. Heres what my form looks like.

<input type="submit" value="$(V2)" style="background-color:#ffffff; border-style:solid; border-color:#ffffff;">

I want the text to be aligned to the right.

05-27-2004, 02:49 PM

05-27-2004, 04:29 PM
Hello Vladdy -

I don't believe that works when applied to a submit/regular button.

- Rex

05-27-2004, 04:43 PM
The text-align:right doesn't work on a button but it does work if it's applied to the form tag. Then if each button has a line break after it, the text for each button will be aligned to the right.

05-27-2004, 04:51 PM
Seems like a very rare case where IE gets it right and Gecko does not.
Per: http://www.w3.org/TR/CSS21/text.html#alignment-prop
text-align applies to inline blocks