- This topic has 12 replies, 4 voices, and was last updated 1 month, 2 weeks ago by
Tom.
-
AuthorPosts
-
January 15, 2021 at 11:58 pm #1620911
Dev
Hello,
I added the button to the menu navigation through this CSS and custom class.
@media (min-width:769px) {
.main-navigation .main-nav ul li.nav-button a {
background-color: #ffffff;
border: 2px solid #000000;
color: #000000;
line-height: 35px; /*this number will likely need to be adjusted*/
}
}After adding the desktop, the view is fine, but the mobile view is not well. Please see the below screenshot.
Please note for the hover effect; I also added the below CSS code.
.main-navigation .main-nav ul li.nav-button:hover a {
color: #459285 !important;
}Please let me know the solution.
January 16, 2021 at 5:52 am #1621130Dev
Hello,
No update on this issue.
January 16, 2021 at 7:17 am #1621366David
StaffCustomer SupportHi there,
you have other CSS that is styling the button on smaller screens ie. this:
@media (max-width: 600px) { .main-navigation:not(.slideout-navigation) .main-nav li.nav-button a { color: #ffffff; border: 3px solid #66ccaa; padding: 8px 18px; border-radius: 2px; margin-left: 24px; transition: all 0.6s ease 0s; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 16, 2021 at 7:20 am #1621370Dev
So what should I do.
Shall I remove the above CSS or what needs to be done?
January 16, 2021 at 8:19 am #1621446David
StaffCustomer SupportTry removing it – then the new styles should apply here to.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 16, 2021 at 9:16 am #1621504Dev
Hello,
I tried to find the below CSS on my site anywhere, but that is not there. What should I do?
@media (max-width: 600px) {
.main-navigation:not(.slideout-navigation) .main-nav li.nav-button a {
color: #ffffff;
border: 3px solid #66ccaa;
padding: 8px 18px;
border-radius: 2px;
margin-left: 24px;
transition: all 0.6s ease 0s;
}
}January 16, 2021 at 9:22 am #1621513David
StaffCustomer SupportI can’t see where it is coming from when the cache is enabled.
Check in the Customizer > Additional CSSDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 16, 2021 at 9:29 am #1621519Dev
Hello,
Thanks, I find it. And removed it as well, but after removing it button in the mobile view gets disappears.
I had also deactivated the caching on the site.
January 16, 2021 at 4:15 pm #1621816Leo
StaffCustomer SupportWhere is the button added?
Is it through a menu item?
Please keep your caching plugins disabled if you need further help from us.
Thanks!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 16, 2021 at 8:37 pm #1621927Dev
Hello,
Please see the below two images, which will explain the issue better.
Desktop View: https://prnt.sc/wykjom
Mobile View: http://prnt.sc/wykkuw
January 17, 2021 at 10:20 am #1622638Tom
Lead DeveloperLead DeveloperTry removing the media query from your CSS, so it looks like this:
.main-navigation .main-nav ul li.nav-button a { background-color: #ffffff; border: 3px solid #000000; color: #000000; line-height: 30px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJanuary 17, 2021 at 10:59 pm #1623027Dev
Hello,
As I’m removing the above CSS mentioned by TOM. Then the border around the image is getting disappeared.
Please see the below image.
Please let me know.
January 18, 2021 at 9:47 am #1623929Tom
Lead DeveloperLead DeveloperAre you replacing it with the CSS I provided?
My CSS is the exact same but without the media query around it, which is telling it to only apply on desktop.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.