?
Solved

button change on hover

Posted on 2011-03-10
2
Medium Priority
?
276 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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 position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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 …
Suggested Courses

770 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