Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-19-2007, 11:57 AM   PM User | #1
prajwala
New Coder

 
Join Date: Feb 2007
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
prajwala is an unknown quantity at this point
Question Rollover submit buttons (IE Vs FF)

I have created a submit button.want to chage the image on rollover.

My code is :

IN HTML :-
<input type="submit"/>


IN CSS :-
input[type=submit]{
background-image:url(images/blue_btn.gif);
background-repeat:no-repeat;
width:99px;
height:37px;

}

input[type=submit]:hover{
background-image:url(images/yellow_btn.gif);
background-repeat:no-repeat;
width:99px;
height:37px;

}



Its working fine in FF but its not working in IE



Thanks in advance

Last edited by prajwala; 12-19-2007 at 12:10 PM..
prajwala is offline   Reply With Quote
Old 12-19-2007, 12:00 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,615
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Which version of IE? In IE6 it’s not working because it doesn’t support the CSS attribute selector. You need to asign an ID to the input and apply the styles accordingly. I don’t know about IE 7, though, as I haven’t done that yet.

Also this <![endif]-->. Is this in your CSS file or where?
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 12-19-2007, 12:16 PM   PM User | #3
prajwala
New Coder

 
Join Date: Feb 2007
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
prajwala is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
Which version of IE? In IE6 it’s not working because it doesn’t support the CSS attribute selector. You need to asign an ID to the input and apply the styles accordingly. I don’t know about IE 7, though, as I haven’t done that yet.

Also this <![endif]-->. Is this in your CSS file or where?
i tried the code using id but its not working


IN HTML :-
<input type="submit" id="test"/>

IN CSS :-
#test{
background-image:url(images/blue_btn.gif);
background-repeat:no-repeat;
width:99px;
height:37px;

}

#test:hover{
background-image:url(images/yellow_btn.gif);
background-repeat:no-repeat;
width:99px;
height:37px;

}
prajwala is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:22 AM.


Advertisement
Log in to turn off these ads.