...

View Full Version : Rollover Button Help



kimmi_baby
04-19-2011, 12:29 PM
Hi,
I'm creating a website in Joomla but I have created the template myself. So i'm assuming what I'm wanting is a HTML/CSS and maybe Javascript issue (although I would prefer no javascript).

I have posted this question many times in different forums and no one seems to be able to help me.

What I want to do is create a rollover menu that also changes the template background everytime a specific button is rolled over. So each button has a normal view and a rollover view as well as a different template background image assigned to it. Is this possible????

If it's NOT possible to change the background image, is it somehow possible to change a separate image when the button rolls over?

So the menu is positioned left and the image I would also like to change is positioned right.

teedoff
04-19-2011, 04:04 PM
Well you can certainly change the image of a button on rollover, but to change another element may indeed require some javascript.

You said you'd posted this in other forums. Have you tried the javascript forum here?

Wojjie
04-19-2011, 04:10 PM
You can accomplish this a few ways, probably most used is making the anchor (a) a block element with text aligned nicely inside, and a background defined, then use the :hover in CSS to define a different background on the anchor on mouse over.

It is similar to changing anchor text color, or underlining it on mouse over, just you are changing the background of it instead.

Wojjie
04-19-2011, 04:12 PM
Quick example:

HTML:


<a href="#" class="rollover">My Button</a>


CSS:


.rollover {background: #eee;display:block;text-align:center;width:150px;height:40px;padding-top:20px}
.rollover:hover {background: #eef}

teedoff
04-19-2011, 04:24 PM
Quick example:

HTML:


<a href="#" class="rollover">My Button</a>


CSS:


.rollover {background: #eee;display:block;text-align:center;width:150px;height:40px;padding-top:20px}
.rollover:hover {background: #eef}



What I want to do is create a rollover menu that also changes the template background everytime a specific button is rolled over. So each button has a normal view and a rollover view as well as a different template background image assigned to it. Is this possible????



She doesn't just want a button rollover.

Wojjie
04-19-2011, 05:30 PM
I didn't understand the "different template background image", and somehow I looked over the bolded part.

Ya, she would need to do a combination of the two then.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum