Change background colour for specific body of text within blog post

Hi,

I’d like to know how to change the background colour for only a specific body of text in my blog post.

https://aussieicebaths.com.au/blogs/news/ice-baths-stress-reduction

For instance, in the above blog post, i would just like to change the background colour for the ‘key takeaways’ section.

Thanks in advance.

@marlerjake
add a class and add some some css or you can directly add the colors in the shopify blog editor also, just select the text and add color like this

Hi @marlerjake

You can do that by go to edit your blog post, click Show HTML icon

Wrap section you want to change background color in to this


// your section text goes here

Save your blog post.

thank you so much for your swift response you beautiful human

is it possible to put a border around this the section too? so it is sort of like a container

Yes, you can do that by update wrap code like this


// your section text goes here

thanks brother. how about if i want to add some extra distance/padding between the border and text?

Hi, you can use this code to do that


// your section text goes here

you are too good, thank you

Do you know how to edit the border size of tables in blog posts? also how to edit the colour of text in the tables and the background colour of the tables?

Could you send me a blog post link with table?

hey brother, quick question. how do i make it so that when i do dot points, the text stays indented outside of the dot points, so it looks cleaner?

hey mate, quick question, how do i make this background the same size as the text?

Hi @marlerjake

Could you send me URL with this part?

https://aussieicebaths.com.au/blogs/news/ice-baths-muscle-soreness

I didn’t end up using the code though because it looked weird being out of proportion with the text