Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Active Link Color

Amber Nov 25, 2013 03:47PM PST

For some reason the active link color for my pages are not showing up when the page is active. I am not sure if I have done something wrong or missing something.

http://cargocollective.com/akcargo

Thanks for your help.

Up 0 rated Down
Andrew Admin Nov 29, 2013 11:23AM PST

Hi, you’re using a feed-based design: these designs do not have active states for projects or pages by default. You can add them in through a couple of modifications to your website.

Start by adding this script tag into your Custom HTML

<script>
$(document).ready(function(){
   if ( Cargo.Config.GetCurrentPageType() =="page" ) {
      $('#' + $('.entry').attr('id').replace("entry_", "menu_") ).addClass("nav_active");
   }
});
</script>

This adds a “nav_active” class to any link that matches your page’s PID . Then, modify this nav_active class by adding a selector for it into your CSS:

.feed_nav a.nav_active {
    color: purple;
    border-bottom: 2px solid purple;
}
Up 0 rated Down
Amber Dec 04, 2013 01:25PM PST
Thank you for taking the time to send this info to me. But I do not under stand what I am supposed to do with the PID in the CSS.

Do I make one of these for each page with 0000000 being the PID number? What will the border-bottom:2px purple do? I just want the font color to change.

Also would I use .feed_nav or my .page_nav a:active? I have edited the menu links with .page_nav, not .feed_nave.

.feed_nav a.nav_active_0000000 {
color: purple;
border-bottom: 2px solid purple;
}
Up 0 rated Down
Amber Dec 04, 2013 01:28PM PST
I spoke to soon. I figured it out! Just copied/pasted what you added and deleted the border-bottom. Thanks!

This topic has been closed.

tickets@cargocollective.com
http://assets1.desk.com/
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
Invalid characters found
/customer/en/portal/articles/autocomplete