Click to See Complete Forum and Search --> : Can I make a cell into a hotspot with rollover attributes?
Boogienipple
10-04-2006, 06:07 AM
Greetings.
I'm sure this is a seriously rookie question, but I'm a graphic designer and Flash designer making the transition into a more legit website developer. To lower my websites' loading times I want to use more HTML, simpler code and fewer images, but I still want large link areas instead of just text. I swear I've seen websites where entire table cells are links (of course I can't remember any off hand!), and can have rollover attributes too. Is this possible or am I whistling dixie?
Thanks. :cool:
TheBearMay
10-04-2006, 06:53 AM
<table><tr>
<td>abcd</td>
<td onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor=''" onclick="document.location='Test.htm'">efgh</td>
</tr></table>
Boogienipple
10-04-2006, 07:53 AM
Thanks, this did the trick, mostly. But one problem still there: The cursor doesnt become a "click" hand until it reaches the actual text link. This is probably just something Im gonna have to live with, but I thought Id ask.
Also, I've tried some other colors and can't seem to get them to show. For instance, the 'yellow' works fine: on rollover the cell turns yellow, but I've tried 'red' and 'blue', etc., and nothing happens. Is there a chart somewhere that lists all the color names that work in HTML? I've tried hex numbers, but no dice there either.
Thanks again!
Boogienipple
10-04-2006, 08:13 AM
Nevermind, just figured it out. Thanks.
but if you have answer to the 'click hand' issue, I'm all ears! Thanks again.
-Jeremy
Efferent
10-04-2006, 08:14 AM
I am not certain, but as far as I aware there are 138 named colour available in IE6, like Lightblue, DeepPink, AquaMarine, etc.
You can always use colour's RGB value to express a colour, for example, in HTML document:
<body bgcolor="#0000ff"> produce the same result as <body bgcolor="blue">
RGB value range from #000000 to #ffffff
daphault
10-05-2006, 01:55 AM
but if you have answer to the 'click hand' issue, I'm all ears! Add cursor:pointer to the objects' style: <td style="cursor:pointer;">Cell text</td>
WebJoel
10-05-2006, 06:33 AM
Add cursor: pointer to the objects' style: <td style="cursor: pointer;">Cell text</td> If I may add to that: Whenever one states "cursor: pointer;", one should probably state:
style="cursor: pointer; cursor: hand;" to ensure that all browsers are fed something that they can use. -It's an IE-proprietary thing I'm afraid.
Be sure that "pointer" comes AFTER "hand" or else IE 5.x gets upset.
Boogienipple
10-05-2006, 06:47 AM
Thanks guys (or girls?) this really helps.
Figured out the rest of my questions too, thanks again. I'll be back with more questions I'm sure.
-Jeremy
sincilite
10-05-2006, 10:32 AM
Can I add as well rather than, having the onmouse actions on the <td>, why not put an anchor in the <td> with a { background-color: #cb0000; } and a:hover{ background-color: #646464; }