Sent by Adam Kuehn on 10 January 2006 15:03
Philippe Wittenbergh wrote:
>On 10 Jan 2006, at 3:21 am, Adam Kuehn wrote:
>
> >>> [1] http://www.littleandreid.com/mentaidyn/about
> >>>
> >>> <ul class="mainnav">
> >>> <li><a href="/" id="menu_default"><span>Home</span></a></li>
> >>> <li><a href="about" class="active"
> >>> id="menu_about"><span>About</span></a></li>
> >>> [--more links--]
> >>> </ul>
>
>But in this case, the CMS (textpattern) and the plugin used for
>generating the menu does the correct thing, by adding the
>class .active to the <a>.
>
>It is just a question of specificity to apply the class
>.mainnav li a:link is more specific than just .active
Yes, except the presence of the ID could complicate things as the ID
could "trump" any number of classes. I agree that if the CSS is
constructed properly, your way should work, but the pre-existing ID
makes it a bit tricky. The author would need to make certain that
any CSS selectors which use that ID do not contain rules the author
wants overridden by the .active class, or the CMS would need to be
configured to swap out the ID (which could get fairly
complicated). Good construction will make it easy, though, as the
rest of your post suggests.
-Adam Kuehn
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
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/