42 users online (0 members and 42 guests)  


  Results 1 to 6 of 6

Related

  1. Multiple Submit buttons    Forum: HTML Forum
    Replies: 3
  2. Submit Buttons [in forms]    Forum: HTML Forum
    Replies: 27
  3. Submit / Reset / Browse Buttons    Forum: CSS Forum
    Replies: 1
  4. multiple submit buttons in single form    Forum: HTML Forum
    Replies: 7
  5. Images with submit buttons    Forum: HTML Forum
    Replies: 1
  1. #1
    mtporter's Avatar
    New User

    Status
    Offline
    Join Date
    May 2008
    Posts
    3

    CSS Buttons and the Submit

    I'm trying to use the CSS oval buttons located at

    dynamicdrive dot com

    They work fine however for regular buttons but when trying to put then inside a form, for the submit button, it does not work!

    I've tried using onsubmit="this.submit();return false;"
    and this does not work either

    <div class="buttonwrapper">
    <input class="ovalbutton" href="#"><span>Submit</span></a>

    using the input type 'submit' or 'button' gives me either a gray button or a X where a image will be.

  2. #2
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: CSS Buttons and the Submit

    Which does not work?...the submission or the buttons
    Anyway, how would the onsubmit affect the buttons?!..I mean..what is the real problem
    Is'nt this the link you were referring
    http://www.dynamicdrive.com/style/cs..._oval_buttons/

    Could you link us to the page where this problem exhibits.

  3. #3
    mtporter's Avatar
    New User

    Status
    Offline
    Join Date
    May 2008
    Posts
    3

    Re: CSS Buttons and the Submit

    Both. I don't have a page up and running with an example and I can't put the link in here for the site in which I want to put it because I'm 'new' here.

    I can use the code:

    <INPUT TYPE="image" SRC="resources/images/sendemail.jpg" ALT="Send Email" width="100" height="20" onsubmit="this.submit();return false;">

    or

    <INPUT TYPE="image" SRC="resources/images/sendemail.jpg" ALT="Send Email" width="100" height="20">

    and use just a image and it works but I cannot use a css style due to the 'input' coming up as a 'button' or a standard 'gray button'.


  4. #4
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: CSS Buttons and the Submit

    I don't know what you're trying to achieve, but I believe that you can style your input buttons with CSS:
    Code:
    input{background:transparent url('myimgae.jpg');}
    You could also give them a classes

  5. #5
    mtporter's Avatar
    New User

    Status
    Offline
    Join Date
    May 2008
    Posts
    3

    Re: CSS Buttons and the Submit

    How is it written to give them classes?

    <div class="buttonwrapper">
    <a class="ovalbutton" href="#"><span>Submit</span></a> <a class="ovalbutton" href="#" style="margin-left: 6px"><span>Reset</span></a>
    </div>

    The above is the code for regular buttons, but when you add 'input type="submit" and add a class to the line you still get the gray box or button along with some of the image from the class

  6. #6
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: CSS Buttons and the Submit

    You might find this basic example useful
    HTML Code:
    <input type="submit" value="Submit" style="background:transparent url('http://www.456bereastreet.com/lab/bulletproof-shrinkwrapping-buttons/button.gif'); width:150px;color:#eee;">



Tags for this Thread