On 7/22/05, Ketan M. Vakil (518-506-6812) <[EMAIL PROTECTED]> wrote:
> I am wondering if the following is possible using CSS/Javascript, and
> if so, can someone point me in the right direction?
>
> If I have a list of links (items) on a page as well as a list of
> links that are categories, I want to be able to hover over a
> "category link" and have only the "item links" that belong in that
> category to then make themselves bold (or "dim" the ones that do not
> belong in the category) Is this even possible?
In CSS2 capable browsers the former is possible with CSS, in MSIE
you'd need JavaScript to help you out.
Generally, the trick is to nest the links you want to be connected
to the other link inside its parent element and then use :hover on
that.
For example:
<ul>
<li><a href="category1.html">Category1</a>
<ul>
<li><a href="subcat1_1.html">Sublink1_1</a></li>
</ul>
</li>
</ul>
and in your CSS:
a:{font-weight:normal;}
li:hover li a {
font-weight:bold;
}
The latter is only possible with JavaScript and might be a real pain
as you need to loop through a lot of links and change their styles
or dynamically add classes.
--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/