473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Change Background Color

Hello,

Could someone, please, tell me how to change the background color of
div when the mouse is hover it?

Thanks,
Miguel

Oct 19 '06 #1
3 2732
On 2006-10-19, shapper <md*****@gmail.comwrote:
Hello,

Could someone, please, tell me how to change the background color of
div when the mouse is hover it?

Thanks,
Miguel
div:hover {background-color: yellow;}
Oct 19 '06 #2
Ben C wrote:
On 2006-10-19, shapper <md*****@gmail.comwrote:
>>Could someone, please, tell me how to change the background color of
div when the mouse is hover it?
div:hover {background-color: yellow;}
But I needn't expect this to work on IE (IE <7 anyway). Right?

--
John
Oct 19 '06 #3
On 2006-10-19, John Hosking <Jo**@Hosking.name.invalidwrote:
Ben C wrote:
>On 2006-10-19, shapper <md*****@gmail.comwrote:
>>>Could someone, please, tell me how to change the background color of
div when the mouse is hover it?
div:hover {background-color: yellow;}

But I needn't expect this to work on IE (IE <7 anyway). Right?
Worth a try. Otherwise you have to use JS, for which the standard
function is addEventListener, but in IE you use I think attachEvent
instead.

Then in the handler you just go (roughly):

event.node.style.backgroundColor = "yellow";
Oct 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Gary | last post by:
I have a table with a form consisting of several checkboxes and I'm wondering if its possible to change the table row background color on mouseover or hover and make it stay that color when the...
7
by: John Baker | last post by:
Hi: I imagine there are hundreds of responses to this question, but i cant find any on the site using a search. How do you change the background color of buttons? I know there must be an easy...
4
by: Georges Heinesch | last post by:
Hi. I have a form defined as datasheet view. Can I change the background color of the individual fields (colums) separately (or all together)? If yes, how? TIA --
4
by: Sebastien IDOUX | last post by:
Hello, I want to change the background color of a panel in a statusbar. Do you have an idea to do it ? Thanks, Sebastien
5
by: DavidB | last post by:
Greetings I don't know if this is possible, but this group should be able to tell me. I have a webpage with a changing message board (I understand the problems with having changing text, but...
1
by: ngpost1 | last post by:
I have a Crystal Reports.Net report being generated from my C# application. I would like to change the background color of the details section (not the text mind you) of the report on certain...
6
by: spit0033 | last post by:
I have created a vertical menu with a white background, once a link is clicked i want that menu item's background color to change. Then once another menu item is clicked the first menu items...
2
by: bucchi | last post by:
Hi, I have an input field and I have to change the background color when the contents change. The contents are changed by a pop-up. On submit of the pop-up the contents change.How can I...
1
by: Ulf Malmros | last post by:
I want to change background color in a control in a form grid depending on the value in another control in the same grid. Can anyone giv me a hint about how to do this? Please!
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.