Hi, I’m trying to set a default style for all buttons in my Genesis child theme so that buttons created in BB are using the styles in my css. But, I can’t target them without using !important… but them I’m unable to customize certain buttons using the BB custom options.
Sorry but the site has a lot of custom buttons so I’m a bit lost as to where these default buttons are. Do you mind showing me where they should be and what colors they should be in so I can test the CSS?
No worries! Based from your CSS, you are able to target the correct elements, just not enough specificity and as a result, was overridden by the default CSS. One of our community members, Leo, was generous enough to provide a quick explanation about CSS Specificity here. You can also check this site for more in-depth explanation.
Hi, I’m now trying to use this code on a site where I’m using a child theme and I can’t get it to work.
See here http://clients.moderntraction.com/getsarah/ Under the Proven Results section, that button ‘Yes, I want to apply!’ is not styled and should be showing in purple, but is not.
Yes I know. I set the colours in the builder so the client would see them. I just want it set to be purple by default using the style in my child theme.
The only button that was set to default was the one in the Proven Results section, so that I can test if it’s picking up the styles from my css. But it isn’t.
I want to figure this out for future website as well.
Is this the CSS you added on your child theme? I don’t think it’s being picked up since there is a weird A character before the background property. http://imgur.com/1llTkHm
Also, you’re missing one class to make it stronger. It should be like this.
Oh weird! This wasn’t showing in my css editor nor in Google Inspector! Not sure how you found it, but I delete the spacing before just to clear it and now it works!
This was likely due to copying over the code from my Evernote.
Yep, that was most likely the case. I simply visited the style.css file of your site from my browser so I’m guessing it supports special characters. Just a piece of advice, I usually paste anything to a notepad first before pasting it to anywhere. It gets rid of those invisible characters. Have fun with The Beaver!