Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-10-31 02:51:01
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Styling an active class
I’m trying to style my links with certain attributes when they are active, but they don’t seem to work properly. I’m not sure if it’s my coding or if it’s something I’m missing with TXP. Here is what my code looks like;
#sidebar ul.subpage li a:hover, #sidebar ul.subpage li a:active {color: #0099ff; border-top: 1px solid #ff9900; border-bottom: 1px solid #ff9900;}
here is what the form looks like;
<li><a class="active" href="<txp:permlink />"><txp:title /></a></li>
Offline
Re: Styling an active class
For a start, you have an error here:
#sidebar ul.subpage li a:active
Should be:
#sidebar ul.subpage li a.active
a.active…
Offline
#3 2009-10-31 17:30:13
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: Styling an active class
Yeah, fixed that but problem still persist. This time, all of the links have the active class as opposed to just the active link.
Offline
Re: Styling an active class
<li><a <txp:if_individual_article><txp:if_article_id>class="active"</txp:if_article_id></txp:if_individual_article> href="<txp:permlink />"><txp:title /></a></li>
I think, just off the top of my head.
Last edited by thebombsite (2009-10-31 19:25:03)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#5 2009-11-04 05:11:10
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: Styling an active class
that doesn’t seem to work either…
Offline
#6 2009-11-04 07:52:16
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Styling an active class
You’ll problably need something like this.
Offline
Pages: 1