Background colour for blog’s text.

Submitted by Dimby on January 6, 2025
Want a background colour for your blog’s text element? One way to do it: Look at the options for the text element you want to use. I have a blog that had a text element with id hyHm3nj8, for instance. Then, add an html component and write in the styling you want.

style^

#hyHm3nj8 {

background-color: grey;

color: white; /* text color */

display: inline-block; /* bground wraps text only */

}

style^

Except you’d use triangle brackets < around style, but I can’t on here or it won’t display. Someone asked and deleted their question and I did some legwork already so here’s what I came up with anyway!

3 Comments
+2
Level 75
Jan 6, 2025
The last style should be < /style> ? (Without the space)
+1
Level 83
Jan 6, 2025
Yes.
+3
Level 68
Jan 6, 2025
Cool, I may refer to this in the future