How do I make a cell change color...

User 1902701 Photo


Registered User
2 posts

I am using the HTML Editor but in Visual Editor mode. I have a table with 5 cells in it. All the cells have a green background. I want the backgrounds to change colors when someone would hover over them with their cursor. How do I do this in the Visual Editor mode of the HTML Editor?
User 3004957 Photo


Registered User
848 posts

I don't think the visual side can do what you want to do. This is called a cell rollover and uses mouse events to trigger it, like onmouseover to trigger the background colour change and onmouseout to reset it back to what it was. I uploaded a snippet to the snippets page of the forum (which I have also attached here) that creates a hover menu. It only has 4 cells but it is dead easy to add another one to the bunch. This does a similar thing and is easily configurable even if you don't know much coding. Simply add this to the snippet folder in your html editor's main folder and it will be available in your snippets tab. Create a new blank page and drag this in between the body tags to see what it does, then have a play with the colours and see how it works. Just ask if you need help to implement it.

Good luck

Dave.

Attachments:

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.