Solved

button change on hover

Posted on 2011-03-10
2
273 Views
Last Modified: 2012-05-11
I am trying to have the image button change on hover, but it is not working.  Can someone please show me where my mistake is?  thanks

css
.update_btn	{
	width:83px;
	height:23px;
	background:url("../images/update_btn.jpg");
	cursor:pointer;
	left: 671px;
	}
	
.update_btn:hover {
	background: url("../images/update_btn1.jpg");
	}

Open in new window



body
<form action="edit_settings_parse.php" method="post">
          <tr>
            <td width="24%">Your Current Password: </td>
            <td colspan="2"><input name="current_pass" type="password" id="current_pass" size="28" maxlength="32" /></td>
          </tr>
          <tr>
            <td width="24%">Create New Password: </td>
            <td colspan="2"><input name="new_pass1" type="password" id="new_pass1" size="28" maxlength="32" /></td>
          </tr>
          <tr>
            <td>Confirm  New Password: </td>
            <td width="66%"><input name="new_pass2" type="password" id="new_pass2" size="28" maxlength="32" /></td>
            <td width="10%"><div class="update_btn"><input name="parse" type="hidden" value="passchange" />
			<input name="submit" type="submit" value="" /></div></td>
          </tr>
        </form>

Open in new window


As soon as I change the type to image, the custom image displays, but I lose functionality.
0
Comment
Question by:MsKrissy
2 Comments
 
LVL 5

Accepted Solution

by:
wmadrid1 earned 400 total points
ID: 35106265
<input name="submit" type="submit" value="" class="update_btn">

or

#update_btn input {
        width:83px;
        height:23px;
        background:url("../images/update_btn.jpg");
        cursor:pointer;
        left: 671px;
        }
       
#update_btn input:hover {
        background: url("../images/update_btn1.jpg");
        }
0
 

Author Closing Comment

by:MsKrissy
ID: 35110460
thank you wmadrid,
I went with adding the class
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

791 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