Bootstrap Button Codes
Permalink
Good Morning,
I am currently using the Palette theme, and adding a button to a Feature block via source code:
<p><span class="btn btn-primary btn-lg">Contact Us Today</span></p>
It looks fine in the editor, but when I click save, it doesn't take the properties of the button, large or small (Lg, sm). Is there something I need to look for that is overiding my button codes?
I have attached screenshots of the buttons, the one I don't want, and the one I want (Clearly Labeled in screenshot)
I am currently using the Palette theme, and adding a button to a Feature block via source code:
<p><span class="btn btn-primary btn-lg">Contact Us Today</span></p>
It looks fine in the editor, but when I click save, it doesn't take the properties of the button, large or small (Lg, sm). Is there something I need to look for that is overiding my button codes?
I have attached screenshots of the buttons, the one I don't want, and the one I want (Clearly Labeled in screenshot)
Thank you for the reply.
Those lines of code are within my page_theme.php files. What do I need to do with them?
Those lines of code are within my page_theme.php files. What do I need to do with them?
Thank you for the reply.
I tried some of those buttons, I am still getting the same style of buttons that seems to override whatever button I put in, large or small.
I tried some of those buttons, I am still getting the same style of buttons that seems to override whatever button I put in, large or small.
With all caches disabled, have a look at the button styles in your browser dev console. In Chrome, right click on one of your problem buttons and select 'Inspect'.
That will tell you what styles are applied, where they come from and the precedence over other styles.
That will tell you what styles are applied, where they come from and the precedence over other styles.
Thank you, I was able to find the main.css file and eliminate the code that was causing the button override.
The only side effect is, if I make any changes to the Design under Page Settings, the button override comes back.
The only side effect is, if I make any changes to the Design under Page Settings, the button override comes back.
It sounds like you may be editing a cached css or compiled less rather than the original.
An alternative to changing the existing css is to create stronger rules for the situations where you want your own button designs.
An alternative to changing the existing css is to create stronger rules for the situations where you want your own button designs.
Take a look at the page_theme.php file to see the options listed at the end of the file thus..