Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

button change on hover

Posted on 2011-03-10
2
Medium Priority
?
277 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
wmadrid1 earned 1600 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

610 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