Michel wrote:
Quote:
I like to have a small menu where the <a> items have a blue background
on hover like normal window-menu's.
Like this:
tr onmouseover="style.background='#0000ff';"
onmouseout="style.background='#ffffff';"
td><a>Menu item 1</a></td
/tr
But I don't like to repeat the onmouse...
Is there no way to use a stylesheet where only a selection of cells or
links have this kind of blue background? |
Yes:
1) Enclose the menu items in a <div> with id or class and use CSS selectors
<div id="menu">
<a ...>blah</a>
</div>
#menu a:hover {...}
2) Apply a class to each <a> element.
<a class="menu" ...>blah</a>
a.menu:hover {...}
Hope that helps. See my site for an example - note how the header, menu
and content links behave differently; and how the internal and external
content links are also different.
--
Mark.
http://tranchant.plus.com/