Ecommerce Shopify WordPress Discussion

Change background color of a custom wordpress html block with additional CSS

I’m trying to change the background color of a custom html WordPress block, but when I access this block, I change the background color of all custom html blocks from other pages this is the CSS instruction I am using:{ background-color: #212529; } I expected the background color of the custom html block to only be changed on this page, however it was also changed on another page which also has a custom html block
In the block settings in the Wordpress editor (i.e. the column at the right side of the window), there is the option to assign a class to a block (all the way at the bottom of the column). Do that, use a unique name for it and create a CSS rule for that class with the desired settings.

February 4, 2024

If you have a custom html, you can always add unique class to wrapper tag, and apply any styles to this specific element: Your CSS code in this case should look like this: .my-unique-block { background-color: #212529; } If you don't have an access to html, try to find the specific postid id class pointing to your block, like postid-17 and change to:{ background-color: #212529; }

February 4, 2024

try this..{ background-color: #212529!important; }

February 4, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.