Sent by Roel Van Gils on 29 July 2004 14:02
Hi Matt,
If you’re not using any server side language (like PHP or ASP), then the
easiest solution would be to to give every item in your navigation its
own ID (id-x) and put just one CSS rule in the <style></style> section
on every page.
For example, that rule could look like this:
#id-x { background-color: red; }
.... replace x with the number of the id that should be affected. Now you
can use the same file to include your navigation on every page and
change the style of the desired item with just one rule.
You could take this a lot further with some sort of (server side)
scripting of course.
Roel
> Hello. I'm learning css and I wanted to know how you folks handle
creating a
> current "state" of a button/link in a navigational system. I've seen
it done
> this way:
>
> <div id="navcontainer">
> <ul id="navlist">
> <li id="active"><a href="#" id="current">Item one</a></li>
> <li><a href="#">Item two</a></li>
> <li><a href="#">Item three</a></li>
> <li><a href="#">Item four</a></li>
> <li><a href="#">Item five</a></li>
> </ul>
> </div>
>
> However, what If I want to use server side includes to make my navigation
> cosistent throughout the site? Would I have to serve a different
navigation
> file for all pages that use item one, item two, or item three.
>
> Or is there a clever way Css can handle it. My site will have at least 30
> pages and I was hoping I could handle this with one css file.
>
> ______________________________________________________________________
> 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/
>
>
--
______________________________________________________________________
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/