Jump to content


Photo
- - - - -

Need Custom Code Help On Navbar (Upgrading From Platformpro)

custom code navbar

Best Answer toddatkins , 11 December 2012 - 02:11 AM

I tried the code and it didn't work.  I actually ended up putting together this, which basically works:

 

 
#site .section-navbar.fixed-top .navline a{color:#e1dddd;background-color:transparent}
#site .section-navbar.fixed-top .navline .current-menu-item a{color:#f4a221;background-color:transparent;}
#site .section-navbar.fixed-top .navline li a:hover {color:#ffffff;background:transparent;}

#secondnav a{color:#e1dddd;background-color:transparent;}
#secondnav .current-menu-item a{color:#f4a221;background-color:transparent;}
#secondnav li a:hover {color:#ffffff;background:transparent;}

#site .section-navbar.fixed-top .navline li.current-page-ancestor a, 
#site .section-navbar.fixed-top .navline li.current_page_item a, 
#site .section-navbar.fixed-top .navline li.current-page-ancestor ul a, 
#site .section-navbar.fixed-top .navline li.current_page_item ul a,
#site .section-navbar.fixed-top .navline li.current_page_item a{color:#f4a221;background-color:transparent;}

Not a very elegant solution, I suppose, but it'll do.  Not sure why your code didn't work.  Thank you for your help, though.

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 toddatkins

toddatkins

    Advanced Member

  • Members

  • 73 posts
  • LocationBaton Rouge, LA
  • Framework Version:2.41
  • Country: Country Flag

Posted 08 December 2012 - 08:39 PM

I finally upgraded (about a year late) to framework, and I am impressed.  Congrats to the developers.

 

I am working on my migration offline so I can take my time with it, but I ran into something I need help with.  In platformpro, I had a piece of code that I used to turn on special highlighting on my primary and secondary navbars.

 

See example here: 

Please Login or Register to see this Hidden Content

 

The primary nav menu item stays lit orange and the secondary page you're currently on stays lit orange.  Neato eh?

 

Well, in migrating to framework, I have decided to go with the fixed navbar for my primary navigation, and then the secondary navbar below the header as before.  But, the variables (or elements) are different from platformpro and so what I need is some help changing the elements in this following code so that it affects the fixed navbar:

 

Please Login or Register to see this Hidden Content

Sorry, I realized I should have posted this in the Customization section.  Can't seem to change it myself.

 

Thanks in advance,

Todd



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 08 December 2012 - 10:12 PM

Todd,

 

Using Firebug (

Please Login or Register to see this Hidden Content

) you may also identify the elements of the NavBar and Secondary Nav, then apply your CSS method, which is, as you said, Neato, to that element in Custom Code or in the child theme's style.css.

 

I'm no CSS expert, but I'm pretty sure this should be relatively easy. I don't think you need the body tag.



#3 toddatkins

toddatkins

    Advanced Member

  • Members

  • 73 posts
  • LocationBaton Rouge, LA
  • Framework Version:2.41
  • Country: Country Flag

Posted 09 December 2012 - 09:39 PM

I tried using firebug to figure it out, but I just can't make it work.  Anyone?



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17653 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 10 December 2012 - 09:30 AM

Hi Todd,

 

Add the following code:

 

 

Please Login or Register to see this Hidden Content



#5 toddatkins

toddatkins

    Advanced Member

  • Members

  • 73 posts
  • LocationBaton Rouge, LA
  • Framework Version:2.41
  • Country: Country Flag

Posted 11 December 2012 - 02:11 AM   Best Answer

I tried the code and it didn't work.  I actually ended up putting together this, which basically works:

 

Please Login or Register to see this Hidden Content

Not a very elegant solution, I suppose, but it'll do.  Not sure why your code didn't work.  Thank you for your help, though.



#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 17653 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 11 December 2012 - 07:41 AM

hmm, the code I gave you most certainly worked, as I tested before hand on my test site, also you shouldn't use ID to target elements in your custom CSS, all sections have classes which should be used in instead, like I did for the second nav above.







Also tagged with one or more of these keywords: custom code, navbar