This is starting to drive me bonkers.
Ideas please?
Expand|Select|Wrap|Line Numbers
- <div class="style1">Gallery
- <div class="style2">
- <table cellpadding="5" width="50" style="font-size:11px;" class="style3">
- <tr><td onMouseOver="alt(this)" onMouseOut="alt(this)"><a href="/flash/studio/">Studio</a></td></tr>
- <tr><td onMouseOver="alt(this)" onMouseOut="alt(this)"><a href="/flash/outdoor/">Outdoor</a></td></tr>
- <tr><td onMouseOver="alt(this)" onMouseOut="alt(this)"><a href="/flash/athletic/">Athletic</a></td></tr>
- <tr><td onMouseOver="alt(this)" onMouseOut="alt(this)"><a href="/flash/event/">Event</a></td></tr>
- <tr><td onMouseOver="alt(this)" onMouseOut="alt(this)"><a href="/flash/lifestyle/">LifeStyle</a></td></tr>
- </table>
- </div>
- </div>
Expand|Select|Wrap|Line Numbers
- .style1 {
- position:relative;
- top:0px;
- left:0px;
- padding: 0px;
- }
- .style2 {
- position:absolute;
- top:12px;
- left:0px;
- visibility:hidden;
- .style3 td {
- background-color:#6D6E71;
- color:white;
- text-align: center;
- border: 1px solid white;
- .style3 a:link { color: white; text-decoration: none; font-weight: normal }
- .style3 a:active { color: white; text-decoration: none; font-weight: bold }
- .style3 a:visited { color: white; text-decoration: none; font-weight: normal }
- .style3 a:hover { color: white; text-decoration: none; font-weight: normal; }
- }
- }
Expand|Select|Wrap|Line Numbers
- function alt(obj)
- {
- if (obj.style.backgroundColor=='white')
- {
- obj.style.backgroundColor='#6D6E71';
- obj.style.color='#FF0000';
- obj.style.border='1px solid white';
- }
- else
- {
- obj.style.backgroundColor='white';
- obj.style.color='#FF0000';
- obj.style.border='1px solid #6D6E71';
- }
- }
EDIT: obj.innerHTML.style.color has the same effect
Also, obj.style.color works for non-link text