473,388 Members | 1,198 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Table cells?

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
4 3528
"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
"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
> > 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
>
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sugapablo | last post by:
Can anyone help me out with some code to change three table cells (<td>) when one is hovered over? I have a calendar grid where each day is made up of three table cells and I want all three to...
4
by: jeffsal | last post by:
I am using sorttable.js to sort a table which works fine which allows a user to sort the table by clicking on the column header. Is there some code I could add to the page (onload or something) to...
1
by: cotton_gear | last post by:
Hello, Fiest of all let me thank this group for so quick in responding to any postings. I am using a javascript based utility from a site to sort the columns of the table. But, for some strange...
3
by: Phil Rutter | last post by:
Hello All, I have about 700 word documents that have 2 tables one is static 4 colums x 5 rows the other is 5 colums x rows ranging from 2 to 100 what i wolud like to do is open the word doc....
7
by: Shawn B. | last post by:
Greetings, I am trying to create a table that has a scrolling body. The problem I'm experiencing is that if the columns in the "body" part of the table exceed the width of the "header" then...
1
by: kingster | last post by:
Hi, I have a regular dataset and all i want to do is make a pivot table display in a browser with the datasource of the pivot table to be this dataset and then the end-user will be able to do...
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
5
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.