SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    May 2007
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    unifie buttom width

    Hi,

    I want to use standard submit buttons and have to give them a fixed width of 100px. Ok, so far no problem. But the border is getting added and this varies in some pixels in different browsers. Is there any way to give the buttoms a fixed width of 100px incl. borders and everything without customizing the style of the button?

    Greetings, Andreas

  2. #2
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Every browser is going to display the buttons differently. However, you could create your own css button by styling out a link with a border around it and an onClick() that submits the form when clicked. Or, you could just create a 100px wide image and use it instead of the default submit button.
    intragenesis, llc professional web & graphic design

  3. #3
    SitePoint Zealot
    Join Date
    May 2007
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    thanks, but that's what I not want to do. I want to use the standard buttons and just want to give them a width of 100px incl. borders and everything.

    Greetings, Andreas

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then make sure the width of the submit button and the left/right borders (as well as left/right margins and padding) add up to 100px.

    So let's say your width is 94px, you have 2px left/right padding, and 1px left/right borders. 94 + 2 + 2 + 1 + 1 = 100


Bookmarks

Posting Permissions

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