- This topic has 25 replies, 2 voices, and was last updated 9 months, 2 weeks ago by
Leo.
-
AuthorPosts
-
April 26, 2020 at 3:17 am #1256128
Carsten
Hi there, how do I style the buttons background color in my Secondary navigation element, without using the general selectors influencing all other buttons.
button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.button:visited, a.wp-block-button__link:not(.has-background)
I could style each button by id, but there must be an easier way?
Which classes can I use for my Secondary navigation element buttons alone?
April 26, 2020 at 9:31 am #1256615Leo
StaffCustomer SupportHi there,
Where can I see the secondary navigation with the buttons in your site?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 26, 2020 at 10:02 am #1256663Carsten
I added my site url, the secondary navigation should be visible on all pages
April 26, 2020 at 3:46 pm #1256960Tom
Lead DeveloperLead DeveloperHi there,
This should help:
.sub-navigation a.button, .sub-navigation a.button:visited { ... } .sub-navigation a.button:hover { ... }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 26, 2020 at 3:52 pm #1256965Carsten
Thanks very much
April 27, 2020 at 3:15 am #1257436Carsten
Resolved
April 27, 2020 at 8:47 am #1258114Tom
Lead DeveloperLead DeveloperYou’re welcome π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 22, 2020 at 1:47 am #1337035Carsten
Hi there, you helped me out with my secondary navigation styling, but how do I add the styling for the active button?
I have tried to add.sub-navigation a.button:active { color: red; }
but this is not working?Thanks!
June 22, 2020 at 8:57 am #1337683Leo
StaffCustomer SupportWhat’s the password to your site so we can see the issue?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 22, 2020 at 9:13 am #1337703Carsten
I removed the password so you can login as
user: generatepress
pass: SgNH*5oqdPrs69vdeF!2tsXhThe
.sub-navigation a.button:active { color: red; }
is not added, as I was testing it out:June 22, 2020 at 11:59 am #1337853Leo
StaffCustomer SupportSorry where can I see this navigation you are referring to?
I only see the menu toggle and slideout navigation on the home page.
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 22, 2020 at 12:57 pm #1337917Carsten
The secondary navigation is only visible for logged in users, which was why, I sent you login credentials.
Thanks
June 22, 2020 at 1:08 pm #1337928Leo
StaffCustomer SupportOk I’m logged in but still don’t see a second navigation.
https://www.screencast.com/t/9TFMXS8EsWhat am I missing?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 22, 2020 at 1:16 pm #1337945Carsten
Did you try to navigate away from that page? π
June 22, 2020 at 6:38 pm #1338126Leo
StaffCustomer SupportI did not as you mentioned that is should be visible in All pages in this reply π
https://generatepress.com/forums/topic/secondary-navigation-element-button-styling/#post-1256663How is that navigation created? It’s missing the
current-menu-item
class so we cannot target it.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.