...

View Full Version : Aligning text in a button



imiscor
05-27-2004, 01: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.

Vladdy
05-27-2004, 01:49 PM
text-align:right;

Rex
05-27-2004, 03:29 PM
Hello Vladdy -

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

- Rex

llizard
05-27-2004, 03: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.

Vladdy
05-27-2004, 03:51 PM
Hmmm....
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum