Jump to content

make link in css show on what page you are...


rootKID
 Share

Recommended Posts

hello, i have been wondering, and this might be a rookie question, but one i simply need to ask, coz it is making me a little bit insane... i have this CSS right now:

/* unvisited link */#forum_cats_title_wrapper a:link {  color:#0087DC;  text-decoration:none;}/* visited link */#forum_cats_title_wrapper a:visited {  color:#0087DC;  text-decoration:none;}/* mouse over link */#forum_cats_title_wrapper a:hover {  color:#172aba;  text-decoration:none;}/* selected link */#forum_cats_title_wrapper a:active {  color:#172aba;  text-decoration:none;}

what i wish, is for the links to show what page i am at, for instance, if i am in a forum, the forum link will be highlighted, meanwhile the others will go down to a more darker blue kind of color... Any ideas? Oo...

Link to comment
Share on other sites

Obviously, you will need separate CSS for that, but there is no way for CSS to know what document is loaded in the browser. You will have to do that manually, or with JavaScript, or using a server-side platform like PHP or ASP.NET. If you only have a few pages, it's easiest to do it manually. A programmatic solution is more efficient, but not easy to figure out if you are new to programming.

Link to comment
Share on other sites

thanks, well i would not say im totally new in to the subject, i do know the difference between if/else statements ;)... anyhow, thanks, i just thought that it could be done with CSS, but since i have alot of pages to cover, something close up to 20 ;), my guess is that i would be needing some programming... again, crap x).... any idea to how i could do this? I did think of making a Table in the DB called 'menu' or something similar to that, and then giv id as always, and 2 more called m_name,m_id... m_id for ID for each and one menu, and name... will, a bonus for the admin's on my website hehe, now im at the programming part, i can just right away code it now im at it, you understand :P... what you think?

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...