Change the background color of a block


I need to change the background color of a block made of 6 rows. I have created a custom class, I have assigned it to the block and changed the background color in the custom class.

If i switch to view mode, it works, the color is changed regularly.

If i preview in browser or if I export the site, the color is NOT changed, remains the standard white.

On the contrary, if i change the background color on the block panel on the right hand side, the change affects all blocks above.

Any idea to solve this inconsistency?

In 2.4.5 it works, gues it´s the same in 2.5

I could only imagine that you might have given the Bloc a class - This would have an influence.

Thanks for replying.

Yes, I have given the block a class and then changed its background color but it does not work.

What’s wrong?

Please help,

Do you cleared already the cache of your browser? If this not helps, do you have a link of your website and how do you named the class?

Thanks for helping. I have cleared the cache.

I do not have a link yet.

I named the class “social_block”.

The strange is that when I toggle the view mode, everything is correct, i.e. the background color is changed as I want.

When I preview in browser, it is not changed and it is the standard white.

Have I made any mistake?


Without a link it is hard to say why this is the case.

The all and ever point.
Did you clear your Browser Cache?!

Unfortunately yes, I did clear the cache, I tried with two browsers, Safari and Firefox.

Another info, I am trying to change the background color of a block in the bottom global area where I put LinkedIn and Facebook links.

Might this be the problem?


So sorrry, as I am a Non coder.
It works fine here on my site, never ever had a problem.

Hope you can sort it with the help of others.

Great people are here in the forum!

What I have noticed is that in the sidebar the color of the block is the standard white despite the fact I have changed it in the custom class assigned to the block.

It seems to be linked to a Global Watch but I do not find the cross to unlink it!

Classes are the inner core of blocs!
Just learn how to use them and fiddle arround :slight_smile:
You will learn to love it!

The best way to control Bloc colours is with Global Swatches. If you require a class it’s only best to use these to apply gradients.

Blocs and rows both support global classes and are by default auto set to the white swatch. Blocs currently can’t have their colour set to transparent.

The colour well in the sidebar is related to global swatches not classes.

It sounds like the class colour is being overidden by the global swatch. Why not just use a global swatch? It will only effect a single bloc, are you sure you don’t have multiple rows in a single Bloc?

1 Like

Hello Norm,

I have found the problems, I had not 100% understood the behavior of Global Swatches, now it works perfectly.

Again thanks!

1 Like