- This topic has 8 replies, 2 voices, and was last updated 6 years, 3 months ago by
Tom.
-
AuthorPosts
-
October 1, 2016 at 5:00 pm #230983
Rylan Urban
Hey Tom. The theme is changing the text color in my custom buttons. I added an important tag
.custom-button2,
.custom-button2:visited {
border: 2.5px;
border-radius: 5px;
border-style: solid;
border-color: #00b70f;
background-color: #00b70f;
padding: 8px 14px;
color: #FFF !important;
}.custom-button2:hover {
background-color: transparent;
border: 2.5px solid #00b70f;
color: #000 !important;
}and it fixed it on desktop. But the mobile versions of the buttons are still reverting back to green colored link text.
Website: http://4eb.5bb.myftpupload.com/wp-admin/
Any suggestion?
October 1, 2016 at 5:34 pm #230989Rylan Urban
oh – it also doesn’t work on Firefox i see. Just chrome!!
Not sure what to do,
Rylan
October 1, 2016 at 9:30 pm #231008Tom
Lead DeveloperLead DeveloperYou could try adding .inside-article in front of it.
So:
.inside-article a.custom-button-2
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 2, 2016 at 9:09 am #231093Rylan Urban
Worked!
Thanks again!
October 2, 2016 at 10:15 am #231104Tom
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-developmentOctober 14, 2016 at 9:14 am #235284Rylan Urban
Hey Tom – for some reason it’s either not working or it switched back!
Check out the footer on http://allgreenmarketing.com
October 14, 2016 at 9:40 am #235292Tom
Lead DeveloperLead DeveloperIf you use the Inspect tool in your browser, you can see the CSS and see if any other selectors are overwriting it.
In the case here, you have the link color set in the page header, so the CSS for that is:
.inside-content-header a
Then your button is:
.custom-button
So the page header CSS is more specific, meaning it will overwrite your CSS.
You can either make your CSS more specific:
.inside-content-header a.custom-button
Or add !important after your link color:
color: #FFF !important;
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 14, 2016 at 12:50 pm #235329Rylan Urban
Hey Tom – it was actually in the footer. But i used your method and attacked it with .footer-widgets a.custom-button-2.
I tried the same method but can’t find the CSS for the case when the button is in the sidebar.
Can you take a look? http://4eb.5bb.myftpupload.com/solar-benefits/
Rylan
October 14, 2016 at 9:03 pm #235396Tom
Lead DeveloperLead DeveloperIt would be:
.sidebar .custom-button2
Or:
.widget .custom-button2
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.