[thelist] css active state
Tim Beadle
tim.beadle at iop.org
Tue Aug 10 07:58:26 CDT 2004
On Tue, 2004-08-10 at 13:42, thelist at punterspower.co.uk wrote:
> Maybe active is the wrong word, it is the wrong word I meant
> onstate.
>
> any ideas or is there more to this code than meest the eye, I am now going
> down the php css path :)
It's quite easy, really. You don't even need to use php to achieve this.
<a href="foo" id="nav-foo">Foo</a>
<a href="bar" id="nav-bar">Bar</a>
<a href="baz" id="nav-baz">Baz</a>
...then, in each section of the site, set (e.g.) <body id="body-foo">,
changing "foo" for "bar" or whateven depending on the section.
...then in your CSS:
#body-foo #nav-foo, #body-bar #nav-bar, #body-baz #nav-baz {
/* styles to indicate that this section is selected */
}
HTH,
Tim
--
Tim Beadle <tim.beadle at iop.org>
More information about the thelist
mailing list