Solved

What am I doing wrong with this submit button?

Posted on 2014-02-11
3
212 Views
Last Modified: 2014-02-24
Trying to replace your typical submit button with a background image using CSS. The inline "<input type="image" src="..." didn't work just because I need to assign a specific value to the button and I couldn't get it to work.

So...

Here's my attempt:

<input type='submit' name='submit_assettype' value='continue' style='background-image:url(images/continue_button.jpg);
background-repeat:no-repeat;
width:100px;
height:40px;'>

...and the result is attached. Basically, I'm getting my image AND your normal submit button and I can't figure out what I'm doing wrong.

Thoughts?
screenshot.png
0
Comment
Question by:brucegust
3 Comments
 
LVL 22

Accepted Solution

by:
plusone3055 earned 250 total points
ID: 39851015
your not wrapping it in a DIV  


div.ui-btn, input[type="submit"]
{
background-image:url(images/continue_button.jpg);
background-repeat:no-repeat;
width:100px;
height:40px;
}
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 200 total points
ID: 39851033
The first thing is expecting "<input type='submit'>" to do something else than be a 'submit button'.  Here are some possibilities: http://cssbutton.com/forms/
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 50 total points
ID: 39851035
Add border:none, remove the value="continue" and make sure the button size is the same as the image.

http://jsfiddle.net/rc7rB/
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSS Position not returning 2 55
alert before form submission 6 40
ASP.net Fit 3 divs on screen side by side 3 25
Width of Page is Affecting Side Menu 6 24
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question