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 :)
 

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

 

Great solution! 

How do I do this when the box is selected? Like in a menu when that page is the one I am on. I have tried things like :active and the extended properties tab with style=background + if statement but it is not working properly... Can you help?


Hey Max,


This is a thread from 2013. So kudos to even find this thread :)

However, since it's from 2013 chances are there a better ways (not in this case perhaps) to solve it and furthermore your question is related. So I would suggest to ask in a new thread.
(in the meanwhile clarify your question as well, because I am not sure if I understand it completely)

J. wrote:

Hey Max,


This is a thread from 2013. So kudos to even find this thread :)

However, since it's from 2013 chances are there a better ways (not in this case perhaps) to solve it and furthermore your question is related. So I would suggest to ask in a new thread.
(in the meanwhile clarify your question as well, because I am not sure if I understand it completely)

I have strarted a new thread https://www.outsystems.com/forums/discussion/59337/change-the-color-of-container-when-selected/#Post226332