# CSS Buttons and the Submit



## mtporter (Jun 5, 2005)

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.


----------



## Jaxo (Feb 21, 2008)

Hey there mtporter,

Give this code below a shot. Replace the first image (bold in red) with the oval button and replace the second image (bold in blue) with the hover over image. The second code box below shows how you reference this within the form. 


```
input.submitButton { 
display: block; 
border: none; 
width: [B]150px[/B];  <!-- Edit for size -->
padding: 15px 0; 
text-align: center; 
background: url([B]images/button_bg.jpg[/B]) no-repeat 0 0; 
}
input:hover.submitButton { 
background: url([B]images/button_bg.jpg[/B]) no-repeat 0 -50px; 
cursor: pointer;
}
```


```
<input class ="submitButton" type="submit" value="Submit" />
```
In theory this should work. So please let us know how it goes. Good luck!


:1angel:


----------

