Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-12-16 14:20:38

grover_c
Member
Registered: 2016-12-10
Posts: 117

Custom CSS Menu help

Hi Guys,

I'm having some difficulty trying to style the top level menu, the drop down (sub) menu and the mobile navigation tray independently?  I've been tying to style menu, primary-menu, menu-item, sub-menu, etc but haven't been able to isolate the items mention above.  Any advice will be much appreciated.

Thanks again

Offline

#2 2016-12-16 14:35:40

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Custom CSS Menu help

Hi Grover,

The controls are fully separate. Use the controls in the "Navigation, Header" to style the header navigation, and "Navigation, Trays" to style the sidebar/mobile navigation.

If you're trying to implement custom styling for one or the other, then use a container class to target the menu specifically, i.e. ".page__tray .menu ..." or "nav .menu" for the header.


Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2016-12-17 04:01:32

grover_c
Member
Registered: 2016-12-10
Posts: 117

Re: Custom CSS Menu help

Thanks.  I'm trying to style the individual menu items (buttons) without effecting the sub menu items using .menu-item.  What would be the CSS to target only the individual top level menu items?  I'm currently using "nav .menu-item" which is working but obviously grabbing the sub-menus as well.

Offline

#4 2016-12-19 15:26:15

grover_c
Member
Registered: 2016-12-10
Posts: 117

Re: Custom CSS Menu help

I sorted it out using the ">" child combinator selector as described here, https://css-tricks.com/child-and-sibling-selectors/

Offline

#5 2016-12-20 14:45:27

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Custom CSS Menu help

Glad you're sorted. In case you weren't already doing so, it's usually best practice to begin by looking at the generated stylesheet, to see exactly how items are being targeted in our CSS.


Matt

The Turning Gate, http://theturninggate.net

Offline

Board footer

Powered by FluxBB