Change background colour for specific body of text within blog post

Solved
marlerjake
Tourist
18 0 1

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.

Accepted Solution (1)
Dan-From-Ryviu
Shopify Partner
5572 1022 1054

This is an accepted solution.

Hi @marlerjake 

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

Screenshot 2023-10-27 at 16.25.58.png

Wrap section you want to change background color in to this 

<div style="background-color: #your-color-code;">
// your section text goes here
</div>

Screenshot 2023-10-27 at 16.24.01.png

Save your blog post. 

 

- Helpful? Like and Accept a solution. - Donate: Buy coffee - or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now

View solution in original post

Replies 14 (14)
ecomheroes_dev
Excursionist
44 1 2

@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

ecomheroes_dev_0-1698398723784.png

 

Hire Shopify Experts For Shopify Store Design and Development
info@ecomheroes.dev
https://ecomheroes.dev
Dan-From-Ryviu
Shopify Partner
5572 1022 1054

This is an accepted solution.

Hi @marlerjake 

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

Screenshot 2023-10-27 at 16.25.58.png

Wrap section you want to change background color in to this 

<div style="background-color: #your-color-code;">
// your section text goes here
</div>

Screenshot 2023-10-27 at 16.24.01.png

Save your blog post. 

 

- Helpful? Like and Accept a solution. - Donate: Buy coffee - or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now

marlerjake
Tourist
18 0 1

thank you so much for your swift response you beautiful human

marlerjake
Tourist
18 0 1

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

Dan-From-Ryviu
Shopify Partner
5572 1022 1054

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

<div style="background-color: #your-color-code; border: 1px solid #border-color-code;">
// your section text goes here
</div>

- Helpful? Like and Accept a solution. - Donate: Buy coffee - or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now

marlerjake
Tourist
18 0 1

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

Dan-From-Ryviu
Shopify Partner
5572 1022 1054

Hi, you can use this code to do that

<div style="background-color: #your-color-code; border: 1px solid #border-color-code; padding: 8px;">
// your section text goes here
</div>

- Helpful? Like and Accept a solution. - Donate: Buy coffee - or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now

marlerjake
Tourist
18 0 1

you are too good, thank you

marlerjake
Tourist
18 0 1

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?

Dan-From-Ryviu
Shopify Partner
5572 1022 1054

Could you send me a blog post link with table?

- Helpful? Like and Accept a solution. - Donate: Buy coffee - or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now

marlerjake
Tourist
18 0 1

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

shopify question.png

Dan-From-Ryviu
Shopify Partner
5572 1022 1054

Hi @marlerjake 

Could you send me URL with this part?

- Helpful? Like and Accept a solution. - Donate: Buy coffee - or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now

marlerjake
Tourist
18 0 1

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

marlerjake
Tourist
18 0 1

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?