SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    PHP Otaku Gibb's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting rid of the "submit" border

    Howdy all,
    I've got a bunch of CSS settings for my submit buttons and i'm trying to figure out how to get rid of the 1px border that appears on the button when you're currently working within the form that links to the submit button.

    So i basically want a permanent 2px border around the button. Whether i'm working within that form or not.

    Here is the code i use for the buttons
    Code:
    .submit 
    {
    cursor: pointer;
    cursor: hand;
    text-decoration:none;
    font-size: 11px;
    font-family:  Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
    font-valign: center;
    color:#000000;
    background:#8CA2D6;
    border-style:solid;
    border-color: #181C18;
    border-width:1px;
    width: 150px;
    height: 20px;
    line-height: 14px;    
    }

  2. #2
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Gibb
    Howdy all,
    I've got a bunch of CSS settings for my submit buttons and i'm trying to figure out how to get rid of the 1px border that appears on the button when you're currently working within the form that links to the submit button.

    So i basically want a permanent 2px border around the button. Whether i'm working within that form or not.
    You confused me, do you want the border or not or are saying something else, lol?

    Code:
    .submit 
    {
    cursor: pointer;
    cursor: hand;
    text-decoration:none;
    font-size: 11px;
    font-family:  Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
    font-valign: center;
    color:#000000;
    background:#8CA2D6;
    border:2px solid #000000;
    height: 20px;
    line-height: 14px;    
    }
    Just use shorthand for a 2px border as indicated by the bolded code. Add the width as a separate property:value

    Or take out the border property if no border is desired.
    Ryan Butler

    Midwest Web Design

  3. #3
    PHP Otaku Gibb's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for the confusion. I'm trying to establish a permanent 2px border around the button. However, there is some setting that puts a 1 px extra border onto the button whenever you are working within a form.

    Say you have a search bar and a submit button. If you're typing in the search bar, the submit button will have an extra 1px border on it. I want to get rid of that feature and just have the permanent settings i choose applied to the button.

  4. #4
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you referring to the focus of the button? That's the only thing I can think of. If so, try adding this line of JavaScript to your page:

    Code:
    <script type="text/javascript">
    // set focus to form field
    document.forms[0].fullName.focus();
    document.forms[0].fullName.select();
    </script>
    Add the above right before the end of your </form> tag. Change fullName to the first input field you have.

    Other than that, I would have to see a URL to understand.
    Ryan Butler

    Midwest Web Design


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
  •