![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using a lot of CSS for my site and would like to create a template that I can use to create new pages more quickly. The centerpiece of my site is a huge navbar with about 10 buttons. This navbar has to be on every single page created from the template. However, for ease of navigation it is vital that the CURRENTLY selected button on that navbar looks different to the other, non-selected buttons. In order to achieve this I have to work through every single page and add the id="current", right? I was wondering if there's an easier way to achieve this, i.e. through the use of a template. Can anybody help? The HTML code on the "Home" page: div id="navbar" ul li><a href="#" id="current">Home</a></li li><a href="#">About us</a></li li><a href="#">Contacts</a></li /ul /div |
#3
| |||
| |||
|
|
Use unique button ID values, e.g., div id="navbar" ul li><a href="#" id="button1">Home</a></li li><a href="#" id="button2">About us</a></li li><a href="#" id="button3">Contacts</a></li /ul /div and load your CSS for each when selected into the stylesheet, e.g., #page1 #button1 a { styles; } #page2 #button2 a { styles; } etc.... is the #page1 the filename? |
#4
| |||
| |||
|
|
"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in news:dfq254$qdc$1 @forums.macromedia.com: Use unique button ID values, e.g., div id="navbar" ul li><a href="#" id="button1">Home</a></li li><a href="#" id="button2">About us</a></li li><a href="#" id="button3">Contacts</a></li /ul /div and load your CSS for each when selected into the stylesheet, e.g., #page1 #button1 a { styles; } #page2 #button2 a { styles; } etc.... is the #page1 the filename? |
![]() |
| Thread Tools | |
| Display Modes | |
| |