Web Analytics Made Easy -
StatCounter Visual problem with text in buttons - CodingForum

Announcement

Collapse
No announcement yet.

Visual problem with text in buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resolved Visual problem with text in buttons

    Hello,

    I try to right or left align a text in a button, but Firefox doesn't position it totally left or right, it leaves a border. It's OK in IE.

    Anybody got an idea to delete this space?

    You can see an example here: (Open it in FF and IE)
    http://www.keroops.com/buttontest.html

    Thank you!

    EDIT: thanks to "abduraooft". Solution is to add "margin:0; padding:0;" to the button
    Last edited by yeri; Apr 15, 2009, 12:25 PM. Reason: Resolved

  • #2
    Heya,

    Don't have two different browsers at work, but I am pretty sure what the problem is.

    Try:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
    <title>Sin tيtulo 1</title>
    
    <style type="text/css">
    input {
    	text-align: right;
    	padding: 0 5px 0 0;
    	margin: 0;
    	width: 200px;
    }
    </style>
    
    </head>
    
    <body>
    <input type="button" value="test text" />
    </body>
    
    </html>

    Comment


    • #3
      Hello nick1988,
      your solution is just the opposite I want: you have added space to be equal as Firefox, and I do _not_ want any space .

      Solution of nick1988 is found here: http://www.keroops.com/buttontest2.html

      Comment


      • #4
        Add margin:0; padding:0; to your button.
        Digitalocean Cloud Hosting (Referral link - get $10 free credit) Fameco

        Comment


        • #5
          Originally posted by yeri View Post
          Hello nick1988,
          your solution is just the opposite I want: you have added space to be equal as Firefox, and I do _not_ want any space .

          Solution of nick1988 is found here: http://www.keroops.com/buttontest2.html
          Ahhh, my bad, sorry.

          abduraooft has the solution then :-)

          Comment


          • #6
            Originally posted by abduraooft View Post
            Add margin:0; padding:0; to your button.
            Thank you, that was perfect!

            Comment

            Working...
            X