Forum Moderators: open

Message Too Old, No Replies

Rollovers for Input Buttons

         

john_m

11:24 am on May 6, 2005 (gmt 0)

10+ Year Member



Hi,
I'm trying to create a similar effect to the Macromedia website input button rollovers. It currently works in IE but not in Firefox. My CSS code is:

input.submit
{ BORDER-RIGHT: #ACB5B5 3px double; BORDER-TOP: #ACB5B5 3px double; BACKGROUND: white repeat-x; BORDER-LEFT: #ACB5B5 3px double; BORDER-BOTTOM: #6F7777 3px double; FONT-FAMILY: Verdana, Arial, sans-serif; FONT-SIZE: 10px; }

:hover input.submit
{ BORDER-RIGHT: #6596CD 3px double; BORDER-TOP: #6596CD 3px double; BORDER-LEFT: #6596CD 3px double; BORDER-BOTTOM: #4468A9 3px double; CURSOR: pointer; }

and the HTML code for the input button is:
<a href="#"><input name="submit" value="submit" class="submit" type="submit" /></a>

Now in Firefox the rollover doesn't work and nor does the link- Firefox thinks that the link is '#' when it's actually something else. I've tried looking in the Macromedia stylesheets to see how this was done but didn't have any luck. Does anyone else know?

Stormfx

7:09 pm on May 6, 2005 (gmt 0)

10+ Year Member



Change:

hover input.submit

To

input.submit:hover

john_m

11:03 pm on May 6, 2005 (gmt 0)

10+ Year Member



That gets it working in Firefox but now it doesn't work in IE :(

D_Blackwell

1:24 am on May 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IE doesn't accept :hover for anything but the <a> element.

Take a look at this thread: [webmasterworld.com...]

My vote goes to whatever:hover