# Onmouseover cell changing links color

**URL:** <https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318>\
**Category:** Rails\
**Created:** [June 17, 2010, 4:36pm UTC](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318 "2010-06-17T16:36:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eltoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@eltoni](https://www.ruby-forum.com/u/eltoni)\
**Post date:** [June 17, 2010, 4:36pm UTC](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318/1 "2010-06-17T16:36:59Z")

</div>

I work with tables.  
I have many links in one cell and I wish when onmouseover the cell all  
links changing for the same new color.  
One link is possible.  
Many links, it is possible?

---

<div class="post-metadata">

**Author:** ![eltoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@eltoni](https://www.ruby-forum.com/u/eltoni)\
**Post date:** [June 17, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318/2 "2010-06-17T16:52:01Z")

</div>

I sincerely apologize for having spelled the title in capital letters

---

<div class="post-metadata">

**Author:** ![eltoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@eltoni](https://www.ruby-forum.com/u/eltoni)\
**Post date:** [June 17, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318/3 "2010-06-17T16:57:04Z")

</div>

On 17 Jun 2010, at 16:36, Antonio Dos santos wrote:

> I work with tables.  
> I have many links in one cell and I wish when onmouseover the cell all  
> links changing for the same new color.  
> One link is possible.  
> Many links, it is possible?

Do it using CSS, it going to be the most efficient way:

table td:hover a {  
color: #123456;  
}

Of course IE might pose a problem here, but it’s up to you to decide  
if you even want to care about that anymore, especially if the link  
coloring is purely cosmetic.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![eltoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@eltoni](https://www.ruby-forum.com/u/eltoni)\
**Post date:** [June 17, 2010, 5:08pm UTC](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318/4 "2010-06-17T17:08:20Z")

</div>

80% of visitors use IE, but thanks for your help.

---

<div class="post-metadata">

**Author:** ![eltoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@eltoni](https://www.ruby-forum.com/u/eltoni)\
**Post date:** [June 17, 2010, 6:57pm UTC](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318/5 "2010-06-17T18:57:16Z")

</div>

Matter resolved. Thank again.

---

<div class="post-metadata">

**Author:** ![eltoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@eltoni](https://www.ruby-forum.com/u/eltoni)\
**Post date:** [June 17, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318/6 "2010-06-17T18:13:49Z")

</div>

> > table td:hover a {  
> > color: #123456;  
> > }
> > 
> > Of course IE might pose a problem here, but it’s up to you to  
> > decide if you even want to care about that anymore, especially if  
> > the link coloring is purely cosmetic.
> 
> 80% of visitors use IE, but thanks for your help.

Well, only IE6 has erratic behavior.

Very quick and dirty, but should give you something to work on:

[http://pastie.org/private/tjz1avqnx3yk3r0ajeypyw](http://pastie.org/private/tjz1avqnx3yk3r0ajeypyw)

Best regards

Peter De Berdt
