How Can I change the background color in a container on hover a picture ?

How Can I change the background color in a container on hover a picture ?

  
Hello dear developers,

How Can I change the background color in a container on hover a picture ?
I have Used a extended propertie "OnMouseOver" and as value  i put some css, but it doesn't worked.

Regards,


Kadir Karapinare
Hello Kadir Karapinar,

You could do this task using javascript? - Yes!
It would be the easiest way? - No! :)

You're making this way more complicated than it needs to be. No Javascript is required to do this.
You can perform it using just CSS and the :hover selector (in CSS it can be used on almost anything, with very few exceptions).
You can create for example a CSS class for your container (lets say .myContainner) and define it together with the selector needed:

.myContainner{}
.myContainner:hover{background-color: red;}

Simple, right?
Hope it helps..

Kind Regards,
Gonçalo Martins

 

Gonçalo Martins wrote:
Hello Kadir Karapinar,

You could do this task using javascript? - Yes!
It would be the easiest way? - No! :)

You're making this way more complicated than it needs to be. No Javascript is required to do this.
You can perform it using just CSS and the :hover selector (in CSS it can be used on almost anything, with very few exceptions).
You can create for example a CSS class for your container (lets say .myContainner) and define it together with the selector needed:

.myContainner{}
.myContainner:hover{background-color: red;}

Simple, right?
Hope it helps..

Kind Regards,
Gonçalo Martins

 

 Thank you very much my friend :)