• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Nile Flores Media

Helping You Rock Out Your Website Like A Rockstar

  • Home
  • About
  • Blog
  • Portfolio
  • Hire Me
  • Resources
  • Contact
  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design
  • News
  • Podcast
You are here: Home » Web Design » Using An Image For The Submit Button

Using An Image For The Submit Button

By Nile Flores 13 Comments


This is a simple tutorial you can use if you would like your submit form to have a submit button other than one you can customize with regular css.

I will be using the following image, but you can made your own and adjust the tutorial to what you need it to be to fit your image. You are welcome to save the image below and try out the tutorial using this image.

submitbutton-example

1. HTML

In your form, you need to name a class for your submit button. In this case, I have put “submit”.

<input type="submit" name="send" value="Submit" class="submit" />

2. CSS

In your css you need to put the following code. You will want to make sure your border is at 0px, specify the height and width, and then insert the background image file name.

.submit {
background-image: url('submitbutton-example.png');
background-repeat: no-repeat;
height: 64px;
width: 171px;
padding-top: 2px;
padding-bottom: 2px;
text-transform: uppercase;
font-weight: bold;
font-size: 16px;
display: block;
border: 0;
text-align: center;
color: #000;
font-family: Arial;
}

Replace submitbutton-example.png with your image and your height and width with the size of your submit button. You can also replace submit with other words or change the text within the button to any size you desire.


Filed Under: Web Design Tagged With: background image url, css, html, input type, tutorial

About Nile Flores

Nile is a 43-year old female from the greater St. Louis (Southern Illinois side) area. Nile is a mother of 1 son. She is also a web designer and developer, a graphic designer, and a public speaker, who exclusively designs and develops using WordPress. She also blogs at GoDaddy's Blog, Verpex Hosting's blog and her very personal sites, Pixelled and Nail Polish Happy.




Related posts:

Tutorial: CSS Rounded Corners Basic HTML Tutorial – What is HTML? Adding A Favicon To Your Website Basic HTML: The A Tag

Reader Interactions

Comments

  1. Nithin Upendran says

    May 30, 2013 at 1:15 am

    Great tip,I would love to make one and put it as my submit button,but the saddest thing is that i am not so good at Photoshop.I want to contact somebody for helping me in Photoshop. Thanks again 😀 for sharing your idea!

    Reply
    • Nile says

      May 30, 2013 at 4:25 am

      The cool thing is there are a lot of websites that offer free graphic buttons. I will be updating and re-introducing my freebie page for buttons soon for people to be able to save and use.

      Reply
  2. Pramod says

    May 30, 2013 at 5:07 am

    I would rather add borders and shadows to a simple Div class and call an event handler on mouse click (on the div) instead of placing image in the submit button . Anyways , its a nice tutorial for newbies .

    Regards ,
    Pramod

    Reply
    • Nile says

      May 30, 2013 at 12:37 pm

      Not everyone uses the CSS… I prefer it as well for my own site. Some people use it as a part of this design… one that I see it a lot it for subscription sign up boxes. Another, I see one some elegantly designed online stores.

      If you re someone that uses a textured backgroud for the image, and still dress it up with CSS for a border or the font, the size of the button, and its positioning, this tutorial is a good basic foundation towards that.

      By the way… the submit button needs no division layer (div)… it is an input type that you can give a CSS element class to.

      Reply
  3. Robert Koening says

    May 30, 2013 at 12:31 pm

    Thank you for showing how to create this feature. I think an image is much easier and better to use for a submit button.

    Reply
  4. Mitch says

    May 30, 2013 at 11:11 pm

    cool this is a nice trick,
    but how would you do it if you also want to add three states for the button – normal, hover, onclick ?

    Reply
  5. chitra says

    June 4, 2013 at 11:38 pm

    I mostly use background color for the submit button.I will try from now onwards images also in my submit button. Thanks for the post

    Reply
  6. Anonymous says

    June 6, 2013 at 12:49 pm

    its a great and something different look to your submit button..
    every people use general and local button but this one gives some extra look and also batter than regular..
    so i like it and also wanna try it..
    thanx for sharing..

    Reply
  7. John B. says

    June 7, 2013 at 12:34 am

    I will try to follow the steps you indicate on a blog that I have for testing.
    I’m no expert in css, but still going to try, I think good idea your tutorial.
    Greetings.

    Reply
  8. Thejas Kamath says

    June 7, 2013 at 10:21 am

    Using image as submit button looks attractive. Thank you for sharing the post. I’m gonna try it on my blog soon.

    Reply
  9. Fahad Amir says

    June 12, 2013 at 10:22 am

    Visual button is easily visualized by the visitors. It need to be offered a new challenges at this time. But at this way many new things and new up gradation that seem your website more updated and attractive for the visitors.
    Thanks..

    Reply
  10. Anurag Jain says

    June 13, 2013 at 5:04 am

    Using photo in place button look something good ,…. i going to try it . Thanks for sharing !!

    Reply
  11. Mark says

    April 26, 2015 at 11:56 am

    Thanks for the very nice refresher course Nile!

    But when it comes to adding any type of HTML code, with exception (maybe) of copy & pasting
    my autoresponder code and adding it to a widget on my blog.

    I’ll basically pass and leave it to the pros such as yourself!

    That just seems to make life a little less hectic!LOL!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow Me On:

  • Facebook
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!




Try to be More Positive on Social Media

Note: You can click on image and view the video in a larger lightbox window.

Footer

The Blog

Lots of free information, tutorials, and more to help you bring your best foot forward with your website.

  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!

Copyright © 2025 · · WordPress