PDA

View Full Version : Change table background on mouseover?



WBB85
01-23-2008, 01:42 AM
1) Script Title: Tabs Menu (mouseover):

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/tabmouseover.htm

3) Describe problem: I am using the Tabs Menu (mouseover) in a html table. I have a background image assigned as table background, that matches the Tabs menu text. Is there some way to make the Tabs Menu change the table background on mouseover?

I want a different background images used for every menu headline. Is that posible?

Strangeplant
01-23-2008, 02:11 PM
The simplest and all cross-browser working approach is CSS. This works even when the user has javascript turned off, and its fast. See this thread: http://www.dynamicdrive.com/forums/archive/index.php/t-13216.html

Note that because of the MANY IE6 rendering problems, there will always be some flicker on mouseover change because a new request for the image is made to the server every time a mouseover occurs unless the element's properties are:

1) the background- color is set to 'transparent',
2) the background-repeat is set as 'repeat', and
3) the background-position is not defined,

and also the image size area (width x height) is greater than 2500 pixels.

Hope this helps.