SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast Superteddy's Avatar
    Join Date
    May 2005
    Location
    Trondheim
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Got a image problem..

    I have been looking around for a way to change the "go" button on my form. Well now i have gotten a test pic that i have been using. The problem is that it seems that the image witch is 17x17px is 1-2px to higher then it should be.

    Link to picture here

    CSS code

    form {
    float:right;
    margin-top: -60px;
    margin-right: 30px;
    font-size: 9px;
    }
    input {
    background-color: #FFF;
    color: #79A3C1;
    border: 1px solid #E5E5E5;
    font-size: 10px;
    padding: 2px;
    }
    input.go {
    border: 0;
    background:none;
    width: 17px;
    background:url('images/button.gif') no-repeat 0 0;
    }
    .button {
    padding: 2px;
    }
    HTML
    <div id="sidebar">
    <form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <input type="text" value="Search..." name="s" id="s" style="width: 99px; color: #666;" />
    <input class="go" type="submit" value="" name="submit">
    </form>
    </div>
    /teddy

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Hi Superteddy,

    Try this:
    Code:
    input.go {
    border: 0;
    background:none;
    width: 17px;
    padding: 0;
    background:url('images/button.gif') no-repeat 0 0;
    }
    Which resets the padding you previously specified for every <input /> to 0 for .go.

  3. #3
    SitePoint Enthusiast Superteddy's Avatar
    Join Date
    May 2005
    Location
    Trondheim
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didnt work but i played around with it some and found out that padding: 1; worked.

    thanks for the help

    /teddy


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
  •