HighDots Forums  

changing cell background on mouseover

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss changing cell background on mouseover in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marita
 
Posts: n/a

Default changing cell background on mouseover - 04-22-2005 , 08:30 AM






I know that you can change the cell background color on mouseover, but is
there a way with stylesheets that a background image can be swapped?

Thanks in advance for any advice!
Marita



Reply With Quote
  #2  
Old   
Benjamin Niemann
 
Posts: n/a

Default Re: changing cell background on mouseover - 04-22-2005 , 09:05 AM






Marita wrote:

Quote:
I know that you can change the cell background color on mouseover, but is
there a way with stylesheets that a background image can be swapped?
In theory you can use :hover pseudo classes on all elements, e.g.
td:hover { background-image: url(/alternate_image.jpeg); }
Unfortunately a certain popular browser supports :hover only on <a> tags...
As far as I know, there is now way around using JS to get it to work in IE.

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/


Reply With Quote
  #3  
Old   
Arctic Fidelity
 
Posts: n/a

Default Re: changing cell background on mouseover - 04-22-2005 , 08:33 PM



Benjamin Niemann <pink (AT) odahoda (DOT) de> wrote in news:d4asqs$nhd$1 (AT) online (DOT) de:

Quote:
Marita wrote:

I know that you can change the cell background color on mouseover,
but is there a way with stylesheets that a background image can be
swapped?
In theory you can use :hover pseudo classes on all elements, e.g.
td:hover { background-image: url(/alternate_image.jpeg); }
Unfortunately a certain popular browser supports :hover only on <a
tags... As far as I know, there is now way around using JS to get it
to work in IE.
The only other option other than using JS (I recommend csshover.htc for
those who go that route) that I have found to work is to use a block
displayed anchor tag. :-/ It's pretty unclean, but I've used it
occassionally for menu's and such to eliminate that extra piece.

--
Arctic Fidelity <spam (AT) sacrificumdeo (DOT) net>
<http://www.sacrificumdeo.net>
"Beware of bugs in the above code; I have only proved it correct, not
tried it." -- Donald Knuth



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.