473,545 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS: Make <TD> a clickable hover color?

Through CSS, is there a way to change the color of a table cell on a hover?
By the way, the cell also contains a link - the text link and table cell
mouseover should both be clickable to the link's destination...

Thanks!
Aug 18 '05 #1
3 9851
Els
Yeah wrote:
Through CSS, is there a way to change the color of a table cell on a hover?
By the way, the cell also contains a link - the text link and table cell
mouseover should both be clickable to the link's destination...


Set the style for that link to display:block; and width:100%;
Then with a:hover you can change the background colour on hover.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Steppenwolf - Hootchie Kootchie Man
Aug 18 '05 #2
Thank you for that awesome snippet of code! I wish I could've figured that
out for myself. Hey, by the way, Netscape doesn't seem to render the
background color of the link fully. It only changes the background color of
the actual text, but cuts off there.

Is there any way to fix that?
"Els" <el*********@ti scali.nl> wrote in message
news:1o******** *******@locusme us.com...
Yeah wrote:
Through CSS, is there a way to change the color of a table cell on a
hover?
By the way, the cell also contains a link - the text link and table cell
mouseover should both be clickable to the link's destination...


Set the style for that link to display:block; and width:100%;
Then with a:hover you can change the background colour on hover.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Steppenwolf - Hootchie Kootchie Man

Aug 27 '05 #3
Els

Toppost fixed.
Please don't toppost.

Yeah wrote:
"Els" <el*********@ti scali.nl> wrote in message
news:1o******** *******@locusme us.com...
Yeah wrote:
Through CSS, is there a way to change the color of a table cell on a
hover?
By the way, the cell also contains a link - the text link and table cell
mouseover should both be clickable to the link's destination...


Set the style for that link to display:block; and width:100%;
Then with a:hover you can change the background colour on hover.


Thank you for that awesome snippet of code! I wish I could've figured that
out for myself. Hey, by the way, Netscape doesn't seem to render the
background color of the link fully. It only changes the background color of
the actual text, but cuts off there.

Is there any way to fix that?


Do you have a URL so that I can look at what happens?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Living Colour - Cult Of Personality
Aug 27 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2420
by: aa | last post by:
I am traing to output the following HTML string from PHP: "<td><input name='".$i-2."' size='2' type='text' onBlur='myfunction(".$i-2.")'></td>" But it somehow mistreats $i-2. PHP does not throw any errors but the browser renders the table incorrectly. I got round this by introducing another variable j=i-2 and using it in place of i-2 It...
6
1718
by: Mel | last post by:
is it possible ? i tried size=100% and 'NADA !' thanks, Mel
14
21897
by: Zenobia | last post by:
Hello folks, Is it possible to position an item within a <td> element? For instance see below. The table has multiple rows, one for each database record. Each row has 3 hrefs associated with it (for edit, delete and update). I want to position these 3 href items in the same columns, which would be posible if the span could be positioned -...
4
5821
by: Dominic | last post by:
I'm looking for a HTML editor that can match the opening and closing HTML tags such as <TR> </TR>, <TD> </TD> I think Dreamweaver does that, right? Even if it does, it may be too expensive for my purpose. Can you suggest any free or inexpensive HTML that can do that? Thanks Dominic
5
4586
by: Magnus Blomberg | last post by:
Hello! I have a table with several rows with text. I want to make the complete cell (or row) clickable as a link/href. Writing <a href...><td>bla bla</td></a> is not possible. If this is possible I have to add several spaces to the text (bla ) to make the clickable area larger. If I have to do this, how to disable the feature that...
2
2667
by: petereffect | last post by:
i have foll. code <tr> <a href="a1.shtml"> <td width='100%'> &nbsp;"+Testing+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td> </a>
2
1747
by: leena | last post by:
My code is this <td bgcolor="#EBEBD8" onMouseOver="bgColor='#CBCBB8'"onMouseOut="bgColor='#EBEBD8'"> i want to put same hover colour on onclick function so how i write that code. If anybody know please help me.
5
2928
by: mahesr | last post by:
I want to match some particular text between <tr>and </tr> or <td>and </td>.... in PHP. like below............ <table><tr> CATEGORY: <td><font face="Verdana" size="1" color="#A000A0"> Wedding Accessories
7
2775
by: Xiaoyan | last post by:
Hi,everyone: I have a problem now. I can't get the information between the <tr><td> and </td></tr>. for example: I use this regular expression can't get it, I don't know why. $test=~/<tr><td>(.*)<\/td><\/td>(.*)<\/td><\/tr>/ms; <tr><td>station</td> <td>station number/identification, see chart above: <br> B = GoMoos buoy B location<br> S...
0
7475
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7409
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7664
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7918
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5981
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5341
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1897
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
715
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.