Jump to content
Beny Schonfeld

Can't Get The Nav Bar Css To Work! Please Help

Recommended Posts

Beny Schonfeld

Hi folks, I've tried everything... I've searched through the forums, docs, etc, tried all the CSS I could find in here and nothing... I can't find the way to customize the colors of my nav bars properly.

The URL: http://designsbyfelicia.com

There's 2 nav bars I'm customizing: the brandnav (purple header section with logo and nav), and the classic nav (black nav bar)

Here are the problems:

1. on the Brandnav, I've managed to code everything I wanted properly except the "li" active state when the user is on a child page. For example, the "services" page has a couple of child pages. When a user is in one of those, there's a white background in the "services" link that I can't find a way to remove (should be transparent, or the same purple color as background). Go to this child page so you can see: http://designsbyfelicia.com/services/custom-furniture-cabinetry/

2. On the Black Nav bar, I'm trying to simply do this:

- no background color on hover

- text color gray

- text color hover: light purple

- text color active: dark purple

That's all!!! And yet nothing I code seems to have an effect...

Here's my CSS code for these two sections at the moment:


#brandnav {

  background-color: #7e60c4;

  border-top: 1px solid #9c85d2 !important;

  border-bottom: 1px solid #000000 !important;

}

#brandnav .content-pad {

  padding: 0em 0 1em 0;

}

#brandnav .brandnav-nav {

  position: relative;

  top: 20px;

}

#brandnav .brandnav-nav ul#menu-brandnav {

  font-family: "Century Gothic", "Helvetica Neue", Helvetica, Arial, sans-serif !important;

  font-size: 13px !important;

  font-weight: 600 !important;

  line-height: 20px !important;

  color: #333333;

  text-shadow: 1px 1px 0 #9c85d2 !important;

}

#brandnav .brandnav-nav ul#menu-brandnav li a {

  color: #333333;

  padding: 10px;

  -webkit-transition: all 0.2s ease-out;

  -moz-transition: all 0.2s ease-out;

  transition: all 0.2s ease-out;

}

#brandnav .brandnav-nav ul#menu-brandnav li a:hover {

  color: #eeeeee !important;

  text-shadow: -1px -1px 0 #222222 !important;

  background-color: transparent !important;

}

#brandnav .brandnav-nav ul#menu-brandnav li:hover {

  background-color: transparent !important;

}

#brandnav .main-nav li:hover,

#brandnav .main-nav .current-menu-ancestor a,

#brandnav .main-nav li.current-menu-ancestor ul a,

#brandnav .main-nav li.current_page_item a,

#brandnav .main-nav li.current-menu-item a,

#brandnav .main-nav li.current_page_parent a,

#brandnav .sf-menu li li,

#brandnav .sf-menu li li li {

  background-color: transparent !important;

  color: #eeeeee !important;

  text-shadow: -1px -1px 0 #222222 !important;

}



#nav.container div.texture {

  background-color: #333333;

  border-top: 1px solid #9c85d2 !important;

  border-bottom: 1px solid #555555 !important;

  box-shadow: 0 0 6px #222222;

  -moz-box-shadow: 0 0 6px #222222;

  -webkit-box-shadow: 0 0 6px #222222;

}

#nav.container div.navigation_wrap.fix {

  border: none !important;

}

#nav.container .main-nav ul#menu-main-navigation li {

  font-family: "Century Gothic", "Helvetica Neue", Helvetica, Arial, sans-serif !important;

  font-size: 13px !important;

  font-weight: 400 !important;

  line-height: 20px !important;

  color: #eeeeee !important;

  text-shadow: -1px -1px 0 #000000 !important;

}

#nav.container .main-nav ul#menu-main-navigation li li a {

  color: #eeeeee !important;

  border-right: 1px solid #222222 !important;

  border-left: 1px solid #999999 !important;

  background-color: #333333 !important;

  -webkit-transition: all 0.2s ease-out;

  -moz-transition: all 0.2s ease-out;

  transition: all 0.2s ease-out;

}

#nav.container .main-nav ul#menu-main-navigation li li a:hover {

  color: #baaae0 !important;

  background-color: #333333 !important;

}

#nav.container .main-nav ul#menu-main-navigation li li:hover {

  background-color: #333333 !important;

}

#nav.container li#menu-item-685 a {

  border-left: none !important;

}

#nav.container li#menu-item-688 a {

  border-right: none !important;

}

#nav.container .main-nav .current-menu-ancestor a,

#nav.container .main-nav li.current-menu-ancestor ul a,

#nav.container .main-nav li.current_page_item a,

#nav.container .main-nav li.current-menu-item a,

#nav.container .main-nav li.current_page_parent a,

#nav.container .sf-menu li li,

#nav.container .sf-menu li li li {

  background-color: #333333 !important;

  color: #baaae0 !important;

}

#navbar.container.no_clone.section-navbar.fix {

  background-color: #333333;

  background-repeat: repeat-x;

  background-image: -khtml-gradient(linear, left top, left bottom, from(#555555), to(#333333));

  /* Konqueror */

  background-image: -moz-linear-gradient(#555555, #333333);

  /* FF 3.6+ */

  background-image: -ms-linear-gradient(#555555, #333333);

  /* IE10 */

  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #555555), color-stop(100%, #333333));

  /* Safari 4+, Chrome 2+ */

  background-image: -webkit-linear-gradient(#555555, #333333);

  /* Safari 5.1+, Chrome 10+ */

  background-image: -o-linear-gradient(#555555, #333333);

  /* Opera 11.10 */

  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#333333', GradientType=0);

  /* IE6 & IE7 */

  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#333333', GradientType=0)";

  /* IE8+ */

  background-image: linear-gradient(#555555, #333333);

  /* the standard */

  box-shadow: 0 0 6px #333333;

  -moz-box-shadow: 0 0 6px #333333;

  -webkit-box-shadow: 0 0 6px #333333;

  border-top: 1px solid #9c85d2;

  border-bottom: 1px solid #555555;

}

#navbar.container.no_clone.section-navbar.fix div.content {

  width: 99% !important;

}

#navbar.container.no_clone.section-navbar.fix div.content div.content-pad {

  padding: 0 !important;

}

#navbar.container.no_clone.section-navbar.fix div.content div.content-pad div.navbar.fix.navbar-content-width.pl-color-black-trans {

  border-radius: 0 !important;

  -moz-border-radius: 0 !important;

  -webkit-border-radius: 0 !important;

  -moz-background-clip: padding !important;

  -webkit-background-clip: padding-box !important;

  background-clip: padding-box !important;

  background-image: none !important;

  box-shadow: 0 0 0 transparent !important;

  -moz-box-shadow: 0 0 0 transparent !important;

  -webkit-box-shadow: 0 0 0 transparent !important;

}

#navbar.container.no_clone.section-navbar.fix div.content div.content-pad div.navbar.fix.navbar-content-width.pl-color-black-trans div.navbar-content-pad.fix {

  padding: 0 5px !important;

}

#navbar.container.no_clone.section-navbar.fix div.content div.content-pad div.navbar.fix.navbar-content-width.pl-color-black-trans div.navbar-content-pad.fix #menu-mobile-device-menu li a {

  text-shadow: -1px -1px 0 #000000;

  padding: 10px 10px !important;

}

I appreciate your help with this! We're going live on Friday with the site so I need to resolve this ASAP.

I would also like this opportunity to suggest something to you for a future update: Your framework is so advanced, it great! Customizing Nav colors should not be this hard! I've spent hours and hours on this... Why isn't there a color picker in the admin setting for each nav bar section??? Just include color pickers for text color, background, border, and for normal, hover and active states and you should be able to shake this issue off for good! (I've noticed it's a recurrent issue people have)

Thanks again!

Beny Schonfeld


Beny Schonfeld

Appeando.com

On Twitter: @appeando

On Facebook: http://facebook.com/appeando

Share this post


Link to post
Share on other sites
catrina

1. The selector for your active link needs to be adjusted. When I inspect the active menu item using Firebug, I see this class:

menu-item menu-item-type-post_type menu-item-object-page current-page-ancestor menu-item-680
You need to use the current-page-ancestor selector to adjust the active item. 2. In this code, the extra li tags are unnecessary (i.e. li li a can just be li a):
#nav.container .main-nav ul#menu-main-navigation li li a {

  color: #eeeeee !important;

  border-right: 1px solid #222222 !important;

  border-left: 1px solid #999999 !important;

  background-color: #333333 !important;

  -webkit-transition: all 0.2s ease-out;

  -moz-transition: all 0.2s ease-out;

  transition: all 0.2s ease-out;

}

#nav.container .main-nav ul#menu-main-navigation li li a:hover {

  color: #baaae0 !important;

  background-color: #333333 !important;

}

#nav.container .main-nav ul#menu-main-navigation li li:hover {

  background-color: #333333 !important;

}

#nav.container li#menu-item-685 a {

  border-left: none !important;

}

[/code]


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Beny Schonfeld

OK, making progress...

On Brandnav, by targeting the following selector I was able to finally remove that white background,...


li#menu-item-680.menu-item.menu-item-type-post_type.menu-item-object-page.current-page-ancestor.menu-item-680 a

As for the other navigation bar, the black one, I tried what you suggested above and nothing. Same result... I don't understand it!

Any other suggestions?


Beny Schonfeld

Appeando.com

On Twitter: @appeando

On Facebook: http://facebook.com/appeando

Share this post


Link to post
Share on other sites
Beny Schonfeld

OK, I went back and deleted all the CSS I had done for the second nav bar (the black one). I simplified a couple of things and now it seems to be working perfectly... I have no idea why I couldn't get this to work before... Maybe I just needed to let it sit for a couple of days :)

Here's the CSS I'm using now:


#nav.container div.texture {

  background-color: #333333;

  border-top: 1px solid #9c85d2 !important;

  border-bottom: 1px solid #555555 !important;

  box-shadow: 0 0 6px #222222;

  -moz-box-shadow: 0 0 6px #222222;

  -webkit-box-shadow: 0 0 6px #222222;

}

#nav.container div.navigation_wrap.fix {

  border: none !important;

}

#nav.container ul li {

  border-right: 1px solid #222222 !important;

  border-left: 1px solid #555555 !important;

}

#nav.container ul li a {

  font-family: "Century Gothic", "Helvetica Neue", Helvetica, Arial, sans-serif !important;

  font-size: 13px !important;

  font-weight: 400 !important;

  line-height: 20px !important;

  color: #eeeeee !important;

  text-shadow: -1px -1px 0 #000000 !important;

  background: transparent !important;

  padding: 5px 14px;

  -webkit-transition: all 0.2s ease-out;

  -moz-transition: all 0.2s ease-out;

  transition: all 0.2s ease-out;

}

#nav.container ul li a:hover {

  color: #baaae0 !important;

}

#nav.container .main-nav .current-menu-ancestor a,

#nav.container .main-nav li.current-menu-ancestor ul a,

#nav.container .main-nav li.current_page_item a,

#nav.container .main-nav li.current-menu-item a,

#nav.container .main-nav li.current_page_parent a,

#nav.container .sf-menu li li,

#nav.container .sf-menu li li li {

  color: #baaae0 !important;

}

#nav.container li#menu-item-685 {

  border-left: none !important;

}

#nav.container li#menu-item-688 {

  border-right: none !important;

}


Beny Schonfeld

Appeando.com

On Twitter: @appeando

On Facebook: http://facebook.com/appeando

Share this post


Link to post
Share on other sites
James B

Excellent, I'm glad you got it sorted. Thank you for sharing the solution with us.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
James B

The topic was marked as resolved.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
    • glyph.marketing
      By glyph.marketing+
      Hello, I am having a problem similar to that experienced by Michael Kummer here. We have pages that show this automatic scrolling issue (examples here and here) and it is sufficiently annoying that we have seen customers bounce while trying to convert. Strangely, it only happens at specific resolutions, so it can be difficult to reproduce. In general we can only consistently reproduce it on a 4k resolution with a browser width between 1517 and 1536px. 
      Thanks to Michael Kummer's help we were able to set the overflow-anchor property to none in the entire body, which fixed the issue as far as we can tell, but also obviously disabled scroll anchoring for the whole site. I tried applying it to the specific element that looked like it was being reloaded, which was the PL Meganav extension, but that was unsuccessful. 
      Can anyone help us figure out which element or ID we can apply this property to, so that we can fix the scrolling issue but not disable scroll anchoring for the entire site?
      Thank you - 
      Glyph Language Services
    • Liv Kundalini
      By Liv Kundalini+
      Hi -
      Pulling my hair out over here, and would love an assist!
      Site I am building, http://www.livkundalini.com/home, has a problem with the submenu items in the nav not appearing. 
      If anyone wants to see what the Nav should look like, feel free to look in the footer on the left hand side.
      Have tried disabling Pagelines and using the twentyseventeen theme, but problem persists.
      Saw this error (pasted at the bottom of this post) displaying in the inspector, and saw discussion of Jetpack potentially being a culprit. Disabled Jetpack, but the problem persists.
      Had the hosting company even flush the server-side cache, but no avail.
      Any thoughts? Please? It's the only thing keeping me from launching this site!
      Many Thanks,
      Todd
       
      WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403   O @ (index):7
    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
×