How to change CSS using HTML element?

I’m trying to change some CSS by adding it within a tag in a HTML element I’ve added to the page, but the style isn’t being applied. Not sure what I’m doing wrong. Here’s what I’m adding to the HTML element:

<style>
.user-data-navigation .horizontal
{
    background-color: red;
}
</style>

Any help would be much appreciated!

3 Likes

In case anyone comes across this in the future, since I haven’t touched CSS in awhile I forgot that the classes on the same element should be together.

Instead of…

.user-data-navigation .horizontal

…it should be…

.user-data-navigation.horizontal
2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.