Solved

button change on hover

Posted on 2011-03-10
2
275 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 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

724 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