The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Why is my class not being applied?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #241311

    I want to give some buttons an orange background color with white font. I added a css class to accomplish that, and tried to apply it using all the permutatations of it combined with the bootstrap classes I previously had (“btn” and “btn-sm”) as can be seen in the Codepen (

    True, there it looks fine, but in my page it doesn’t! It changes the appearance of the buttons a little bit, but doesn’t make the background orange, nor the font text white:

    I even added “!important” to the two color properties, to no avail.

    What could be causing some of these values (even when importantified) to not be applied? What do I need to do to change the button’s colors?


    Probably due to there being greater specificity of the other button selectors in the CSS.

    Try using the developer toolbar to select a button to see what selectors are already in use and take your cues from that.

    Without seeing your page, it’s hard to give more specific help though.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.