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:
#main.site-main.post-single.order-first{ 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
2
Answers
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.
try this..