Click to See Complete Forum and Search --> : What's the code for this effect?


whitepacifica
07-30-2003, 06:21 PM
Hi,

I'm trying to find out what a code is for a certain "effect". Visit http://www.mariahc.nu and look at their menu/navigation. How can I get the coding for that?
Your help is appreciated =o)

Thanks,
Crystal

PeOfEo
07-30-2003, 10:48 PM
use something like this

<td align="center" onMouseOver="style.backgroundColor='#336699';" style.cursor='hand'" onMouseOut="style.backgroundColor='#000000';" bgcolor="000000"> Link here </td></tr>
That will make a table cell change colors on mouse over, I looked at that code and I didn't quite see what was happening but this will do the same thing.

pyro
07-30-2003, 10:52 PM
Besides using tables for layout, you used cursor:hand which is IE only (and not valid - http://www.w3.org/TR/REC-CSS2/ui.html#cursor-props). Please use cursor:pointer, which is the valid, cross-browser way to do that.

PeOfEo
07-31-2003, 01:15 AM
You actually dont even need that cursor thing. But that is just a table cell way of doing it, you could do it to a div too. By the way I am redoing the layout on my site to css. But I am in no rush.

pyro
07-31-2003, 07:19 AM
But, if you are going to do it, you should do it right...

Looking at it again shows that it won't work anyway, you closed your onmouseover before you put the style for the cursor in. Also, you should set the cursor back to default onmouseout...

PeOfEo
07-31-2003, 01:40 PM
It does work because I used that code before in the past. I could use some work but it does function.

pyro
07-31-2003, 01:49 PM
Not for me... You didn't include the style to change the cursor in the onmouseover. Did you even try the code?

PeOfEo
07-31-2003, 01:57 PM
Like I said it was on one of my firsat sites, I did not write the code but I used it and never had a problem with it, just get rid of all the cursor stuff and the mouse overs will work.
<td align="center" onMouseOver="style.backgroundColor='#336699';" onMouseOut="style.backgroundColor='#000000';" bgcolor="000000"> Link here </td></tr> That will work. it will produce the diesired affect that whitepacifica is going for.

pyro
07-31-2003, 02:00 PM
Yep, that part will. I was referring to (and had been all along) the cursor.

PeOfEo
07-31-2003, 02:07 PM
Oh, well the cursor doesnt even matter with the question I just never took that part out. I dont even see the point of changing it, I am not using the cell as a link or anything.