Thread: Submit Buttons
View Single Post
  #2 (permalink)  
Old 01-31-2004, 07:44 PM
ranjan's Avatar
ranjan ranjan is offline
WebProWorld Pro
 

Join Date: Sep 2003
Location: CA
Posts: 174
ranjan RepRank 0
Default

define two classes in your style sheet

Code:
.oldclass {
	background-color:#ccc;
        background-image: url(pic.gif);
	color:#333;
}
.newclass {
	background-color:#333;
        background-image: url(pic_over.gif);
	color:#ccc;
}
now any input tag that contains the following code

Code:
<input class="oldclass" type="submit" name="Submit" value="Submit" onmouseover="this.className='newclass';" onmouseout="this.className='oldclass';">
will have a mouse over effect. The pic.gif is normal state and pic_over.gif is hover state images resp.
__________________
ranjan | Macromedia Certified Dreamweaver MX Developer
http://www.dreamlettes.net - a dreamweaver resource
http://www.ranjan.ws - got blog?
http://www.total-impact.com - a web design community
Reply With Quote