max a écrit :
hello
(is this a css or a javascript question? or both?)
It could be an interesting css question if IE is not used
except if as example given you use links in your divs.
when hovering, I can change the background (bg) color of a field (div),
e.g.
http://www.bep-zuerich.ch/hover4.htm
You only want this effect ?
CSS :
=====
#menu { list-style: none; display: inline; }
#menu li { margin: 0; padding: 0; width: 75px; }
#menu a { display: block; text-align: center;
text-decoration: none; color: white; background:#999;}
#menu a:hover { color: maroon; background: #ffc; }
HTML :
======
<ul id="menu">
<li><a href="page1.htm">menu 1</a></li>
<li><a href="page2.htm">menu 2</a></li>
<li><a href="page3.htm">menu 3</a></li>
</ul>
<hr style="clear:left;visibility:hidden" />
how can I do this? thanks for any help. max.
javascript
:
===========
function roll(what) {
what.className = what.className=='grey'? 'light_grey' : 'grey';
}
CSS :
=====
..grey { background: #999; }
..light_grey { background: #ddd; }
html :
======
<input name="one" class="grey"
onmouseover="roll(this);" onmouseout="roll(this);" />
<input name="two" class="grey"
onmouseover="roll(this);" onmouseout="roll(this);"/>
<input name="three" class="grey"
onmouseover="roll(this);" onmouseout="roll(this);" />
See my contact form about focus, hover in inputs
(and help in JS for IE)
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Contact :
http://stephane.moriaux.perso.wanadoo.fr/contact