Jump to content

Recommended Posts

I use CSS to change the background color and cursor when you mouseover a check box.

 

The problem is, in IE, the background color of the check box doesn't change, and in Opera, the default pointer isn't replaced with my custom cursor.

 

Could someone please tell me how to fix this? Oh and it works fine in Firefox :D

 

input:hover{background-color:#000000;cursor:url("a"),auto}

 

Edit: actually the background isn't changing in Firefox either =/

Link to comment
https://forums.phpfreaks.com/topic/41921-background-colorcursor-hover-effect/
Share on other sites

a is a relative file path.

And the hover works on text input fields, buttons, and textareas, not just links.

The only thing it doesn't seem to work on is checkboxes and select menus. In firefox it isn't working for checkboxes either but is for select menus.

 

I want to get that stuff working in firefox and ie like it is working in opera, and I want to get the custom cursor to work in opera like it is working in firefox and ie.

 

Please tell me how to fix it :D

 

I don't mind if it needs a messy hack or something as long as it works.

What jcombs was referring to about :hover only working for links in IE. Was that IE (6 and below) only supported it for anchor tags. M$ has finally got around to allowing :hover to work on any tag with the latest release of IE7.

Sorry I did not post the entire thing

 

a:hover,input:hover,textarea:hover,select:hover,span:hover{text-align:center;background-color:#66ffff;color:#000000;cursor:url("a2.htm"),auto}

 

How do I change this so that check boxes in IE change the same way they do in Opera? Right now they do not change in IE when I put my mouse over them =(

  • 2 weeks later...

I'm not particularly good at JavaScript, but this might do it:

 

tags = getElementsByTagName("input");

for (var i = 0; i < tags.length; i++)
{ 
tags[i].onmouseover = "this.style.textAlign='center'; this.style.backgroundColor='#6ff'; this.style.color='#000';";
}

 

And for another time, please refrain from using such images. They are only annoying and simply typing bump or whatever bumps them as well as an image does.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.