Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Aligning text in a button

    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.
    Last edited by imiscor; 05-27-2004 at 02:46 PM.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    text-align:right;
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #3
    Rex
    Rex is offline
    New Coder
    Join Date
    May 2004
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello Vladdy -

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

    - Rex
    Sincerely,
    Rex

  • #4
    Regular Coder
    Join Date
    Apr 2004
    Location
    Canada
    Posts
    302
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •