Jump to content

Css nav bar problem


elmohack
 Share

Recommended Posts

So im trying to make a nav bar . Im trying to get this effect.. when u click on the page .. the nav bar font will change color on the name of that page i am on.. I tried select or active .. active is only when im clicking on it .. but thats not what i want. an example wud be http://www.austinclassicalballet.com/directions.htm but the difference is their website when activethe star "image' will become black on the page u are on.. but for me i want the font color to change so far this are my codes .nav2 li { display: inline; list-style: none; width: auto; padding-left:10px ;padding-right:10px; max-height: 30px; float: left; margin: 0 px; text-align: center; background:transparent; border-right:1px solid #e3e3e3;border-left:1px solid #f9f9f9; } .nav2 a{ display:block; height:30px; line-height:31px; text-decoration:none; border:none; color:#a6a6a6; font-size:16px;font-family: 'Open Sans', sans-serif;font-weight: 300; transition: color .55s ease-in-out; -moz-transition: color .55s ease-in-out; -webkit-transition: color .55s ease-in-out; } .nav2 a:hover{ color:#353535; }

Link to comment
Share on other sites

The current pages link is given a id ref id="current", if the menu is placed manually in individual pages, just place this ref to current menu link, if dynamically php, JavaScript, you identify the page you are on search through menu links, if match found apply the id ref and the css styling for that is applied.

Link to comment
Share on other sites

oo thanks . So i guess there is no other way then individualy :c
Or learn JS or PHP :D - I am in the same boat as you bro... I am starting a big website project and I NEED (not simply want) the nav bar to do this. Maybe we can work together on the JS/PHP?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...