Previous Message
Next Message

RE: [css-d] Styling form input type eq image

Sent by Saila, Craig on 30 January 2003 16:04


Judith Taylor wrote:

>     <input type="image" src="images/join_button.gif" border="0"> 
>    </form>
> 
> Is there a way to style the image input button to match my a:hover
> style? 

This will work in the latest Opera, and Gecko-based browsers, if the
image has a transparent background:
 input[type=image]:hover, div#rightcol a:hover {background: #ffd789; }

(The above says when the INPUT with "type=image" is hovered over, change
the background -- IE/Win does recognize the attribute selector.)

If you want support in IE/Win you will need to wrap an anchor around the
relevant INPUT and probably cancel it's action via JavaScript. Not
pretty nor good mark-up, but...

-- 
Cheers,

Craig Saila
------------------------------------------
[EMAIL-REMOVED] : http://www.saila.com/
------------------------------------------
Previous Message
Next Message

Message thread:

Possibly related: