2 replies [Last post]
Last seen: 17 years 50 weeks ago
Joined: 2004-09-02
Posts: 1
Points: 0

I built a site using a directory specific left nav server-side include. The idea was so that every time the client makes a change I only have to change the nav once for all pages within the given directory. Now the client wants the page their on to have the respective link in the nav be bold so the user gets a sense as to where they are in the site ( make sense?)

is there a way using CSS, perhaps in conjunction with javascript to have the links in the left nav go bold when on the page they link to?
(typically I just bold it using static HTML but I am trying to avoid that as it becomes a maintenance nightmare)

thepineapplehead's picture
Last seen: 16 weeks 3 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

bolding page specific links on a shared navigation ssi

If the navigation uses a list, give each item an id, eg

<li id="home"> Home </li>
<li id="page2">Page 2</li>

Then use body id's, eg:

<body id="home"> for the homepage.

In the css, use something like:

#home ul id#home, #page2 ul li #page2 {
font-weight: bold; }

See alistapart.com if you don't understand (the 'Sliding Doors' article.)

Verschwindende wrote:
  • CSS doesn't make pies

Hugo's picture
Last seen: 7 years 32 weeks ago
Joined: 2004-06-06
Posts: 15668
Points: 2806

bolding page specific links on a shared navigation ssi

If you are already using server sides can you maybe change to using php scripting as there are some nice scripts that will achieve the required results as an inlclude file, if so this article may be of interest;



Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me