Adding CSS in - Settings- Code

If I add the following CSS into the Page inspector CSS, it works fine.
However if I copy and paste it into the main Settings - code (i.e. to make it accross all pages) it doesn’t work.
Does anyone know what i’m doing wrong? Heres the code:

.btn {font-weight:300;}
kbd {background-color: #BF6F6F;}

It comes down to where RW is injecting the code. The site-wide field is getting injected into the main CSS file for the theme, which comes before Foundry’s Control Center stack. So, thanks to the magic of Cascading Stylesheets (CSS) the newest code on the page, in this case that of the Control Center, is overriding your previously inserted code.

CSS has an override for this called !important however. Though to be sure this is a powerful tool.

Try the following in your site-wide, CSS code field:

.btn {
    font-weight: 300 !important;
}

kbd {
    background-color: #BF6F6F !important;
}
3 Likes

Thanks Adam, thats really helpful + works perfectly now.
I never understood before why some CSS includes the !important; bit

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.