jakeselectronics
New Member
- Messages
- 38
- Reaction score
- 0
- Points
- 0
I am changing my site over to use php includes to make it easier to update as the site grows.
I have come across an issue.
I have a menu and say for instance i am on the home page. 'Home' will be in lighter text because of a different class used for the home page.
When you move onto another page, say for instance the contact page. the text 'Contact' will now be lighter...
But using a php include file for the menu prevents me from changing the colour/shade of the text depending on which page your on becasue the menu will be universal.
Or can I still use 1 php include file for the menu, and change the text class (to change text shade) depending on which page i am on.
Like an If statement in the include...
example: If on home page, show light text. else show dark text
Check out my site to see how it performs now... How do i acheive the same result using an include file for the menu.
Can this be done with javascript?
Edit:
Never mind....
I worked it out.
Found a code here perfect for what i needed...
http://www.maketemplate.com/menu/
I have come across an issue.
I have a menu and say for instance i am on the home page. 'Home' will be in lighter text because of a different class used for the home page.
When you move onto another page, say for instance the contact page. the text 'Contact' will now be lighter...
But using a php include file for the menu prevents me from changing the colour/shade of the text depending on which page your on becasue the menu will be universal.
Or can I still use 1 php include file for the menu, and change the text class (to change text shade) depending on which page i am on.
Like an If statement in the include...
Code:
<td>
<a href="index.html" class="************">Home</a>
</td>
example: If on home page, show light text. else show dark text
Check out my site to see how it performs now... How do i acheive the same result using an include file for the menu.
Can this be done with javascript?
Edit:
Never mind....
I worked it out.
Found a code here perfect for what i needed...
http://www.maketemplate.com/menu/
Last edited: