Posts: 59
Threads: 14
Joined: Dec 2009
Sorry, i didn't know where about to post this.
But my question is, on some templates there is an active state (on the link).
Example:
Code:
<li><a href="index.html" class="active">Home</a></li>
But. because we use get_navigation() and it does it all for us.
Is there a way to get that active state, onto the active page?
If not, any way you think you could implement it?
Cheers
Ant
Posts: 1,108
Threads: 70
Joined: Aug 2009
not quiet sure I understand what you need here.
Current page is always the active one.
Posts: 1,848
Threads: 86
Joined: Aug 2009
For the main GS site, this is what I use for my CSS to get active states. The key here is that GS always puts the class current on the "active" link's LI element.
Code:
#bodycontent .sidebar ul.nav {list-style:none;margin:0 0 30px 0;width:250px;}
#bodycontent .sidebar ul.nav li {margin:0 0 3px 0;}
#bodycontent .sidebar ul.nav li a {display:block;padding:10px 15px;}
#bodycontent .sidebar ul.nav li a:link, #bodycontent .sidebar ul.nav li a:visited {
background:#436467;
color:#DBE2E3;
}
#bodycontent .sidebar ul.nav li a:hover, #bodycontent .sidebar ul.nav li.current a {
background:#111;
color:#fff;
}
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 59
Threads: 14
Joined: Dec 2009
I forgot to say thanks for this, i'll give it a shot!
Cheers chris!
Posts: 59
Threads: 14
Joined: Dec 2009
Okay, Chris i just got around to this again as i'm coding my new layout for my portfolio.
Just a quick question, is there any special html?
Are you making any classes in the a href? Is it class="current"?
Tbh i don't get this
. Any explination please.
Posts: 339
Threads: 27
Joined: Nov 2009
GS adds the class current to the page that is open.
You just need to style the .current condition in your css file and your good to go.
Posts: 59
Threads: 14
Joined: Dec 2009
Yah, sorry i done it now
. I'll pos tmy site in the using gs part.