Jump to content
Sign in to follow this  
rootKID

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

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

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...