Log In · Register

 
current page style...?
Maccabee
post Jul 20 2009, 09:37 AM
Post #1


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382



I have seen on some sites, when you click on a nav link when you go the page, that link stays, highlighted or something signifying that you are still on that page. How do you do that? I thought you just used "a:active"? But im trying it out and it isnt working.
 
 
Start new topic
Replies
mipadi
post Jul 21 2009, 01:41 PM
Post #2


Senior Member
******

Group: Administrator
Posts: 2,648
Joined: Apr 2008
Member No: 639,265



In most cases, it's probably just a simple bit of server-side logic, like so:

CODE
<a href="link.html"{% if currentpage %} class="currentpage"{% endif %}</a>


And then you just style a.currentpage using CSS.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: