By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,785 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,785 IT Pros & Developers. It's quick & easy.

Table cells?

P: n/a
What I am trying to do under CSS is to create a mouseover effect with the
background and foreground changing within a table cell!

<table>
<tr><td><a href=whatever>This is where I want the mouseover to work
within this link</a>
</td></tr>
</table>

Any ideas guys/gals?

The reason I ask is that I would like steer away from javascript for that
type of mouseover and the effect that I have seen, in my opinion, looks
good!
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"PhilG" <ph**@aplusdesign.co.uk> wrote:
What I am trying to do under CSS is to create a mouseover effect
with the background and foreground changing within a table cell!


In principle, you could use td:hover, but few browsers (counted by
frequency of use) support that. Instead, since your td contains just a
link, specify the dimensions of the link so that is covers the entire
cell,
td: link, td: visited { display: block; width: 100%; height: 100%; }
and assign properties to :link:hover and :visited:hover.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2

P: n/a
"PhilG" <ph**@aplusdesign.co.uk> wrote in message
news:3f***********************@lovejoy.zen.co.uk.. .
What I am trying to do under CSS is to create a mouseover effect with the
background and foreground changing within a table cell!

<table>
<tr><td><a href=whatever>This is where I want the mouseover to work
within this link</a>
</td></tr>
</table>


For the link itself use the a:hover pseudo-class,
but that will _not_ apply to the table cell.

Does that do what you want?

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Jul 20 '05 #3

P: n/a
> > What I am trying to do under CSS is to create a mouseover effect with
the
background and foreground changing within a table cell!

<table>
<tr><td><a href=whatever>This is where I want the mouseover to work
within this link</a>
</td></tr>
</table>
For the link itself use the a:hover pseudo-class,
but that will _not_ apply to the table cell.

Does that do what you want?


I basically would like the whole cell background to change color using the
a:hover pseudo-class, or maybe something similar!
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site

Jul 20 '05 #4

P: n/a
>
What I am trying to do under CSS is to create a mouseover effect
with the background and foreground changing within a table cell!
In principle, you could use td:hover, but few browsers (counted by
frequency of use) support that. Instead, since your td contains just a
link, specify the dimensions of the link so that is covers the entire
cell,
td: link, td: visited { display: block; width: 100%; height: 100%; }
and assign properties to :link:hover and :visited:hover.


Spot on, just what I was looking for! Thanx
--
Yucca, http://www.cs.tut.fi/~jkorpela/

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.