Sent by Marcus Williams on 29 July 2004 16:04
On 29/07/2004, Chris Heilmann wrote:
> As with _any_ ALA article, make sure to read the discussion about it, too.
> This example especially is really bad PHP coding style... But hey, this is
> CSS-D, let's take this topic off-line unless someone _does_ know a
> CSS-only solution.
Someone actually suggested a CSS solution on the ALA article that I've
used to good effect elsewhere. Basically on each of your pages you
define an id attribute on the body tag of that page that defines what
page it is. You can then use standard descendant selectors to
highlight the current state:
<body id="intro">
<ul id='mainmenu'>
<li class="menuintro">Intro</li>
<li class="menucurriculum">Curriculum</li>
<li class="menuportfolio">Portfolio</li>
<li class="menuprojets">Projets</li>
<li class="menucontact">Contact</li>
</ul>
</body>
#intro .menuintro { your "current/active" style goes here }
Simple to use, CSS only.
Marcus
--
Marcus Williams -- http://www.quintic.co.uk
Quintic Ltd, 39 Newnham Road, Cambridge, UK
This message is private [ ] public [*]
______________________________________________________________________
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/