# \[CSS\] Creating ACTIVE states

**URL:** <https://forum.kirupa.com/t/css-creating-active-states/203387>\
**Category:** web dev\
**Created:** [October 10, 2006, 6:02pm UTC](https://forum.kirupa.com/t/css-creating-active-states/203387 "2006-10-10T18:02:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [October 10, 2006, 6:02pm UTC](https://forum.kirupa.com/t/css-creating-active-states/203387/1 "2006-10-10T18:02:38Z")

</div>

Alright let me explain a little bit…

I have a site, with a header, sidebar main content area and footer

The header and sidebar _ **are both included with PERL** _ depending on which page determines which sidebar to include as it changes across the site

Now, What I would like to achieve is to have ACTIVE states, ie, when someone clicks a link from the sidebar, it then changes to ACTIVE to compliment the page it is displaying.

I found a solution, and it had me add _id=“blahblah”_ into my \<a href\> tags in my unorderd list, as well as adding _id=“blahbleehblooh”_ to my \<body\> tags. and then i create the proper styling to make the list item appear differently.

However, my \<body\> tag is within my header include, which is one file used for every page on the site, so I can’t give each page an individual id.

That, if you are paying attention, is the problem.

Any ideas that don’t involve JS or some form of server side kludgy work around???

:hangover::hangover::hangover::hangover::hangover::hangover::hangover::hangover::hangover::hangover::hangover::hangover:
