When you have multiple authors on a Blogger blog and want to make a specific post stand-out, you can change anytime the background color of your posts or apply a background image behind them. And this can be easily done by wrapping the post's HTML in a 'div' element. You can apply this trick to your already published posts or you can change/remove it later if that's your wish.
Related: How to Add Different Backgrounds in Blogger Pages
So, this tutorial will show you how to style each post differently by adding some code snippets in your Blogger posts. Please note that this trick won't work if you have implemented the auto-read more function.
Step 2. Once you have finished writing the post, switch to the 'HTML' tab and add the following code just at the beginning and at the end of the post content - see the screenshot below for more info.
Note:
- replace the hex value in blue to change the background color and the color value in green with the color of the post's text. You can use this Color Code Generator tool to pick your favorite color.
- "Your text here...." is where the Post content should go, i.e. between the <div style="..."></div> tags.
Note:
- paste the URL address of your hosted picture (use Photobucket, Tinypic etc.) where it says IMAGE-URL-HERE
- the line in red and the </div> tag has to be added at the beginning and at the end of the post's HTML.
- if the background image is dark, then you will need to change the text color - replace the #000 color value with #fff
- "Your text here...." is where your Post content should go.
Step 3. Now click the 'Publish' button and you are done.
Related: How to Add Different Backgrounds in Blogger Pages
So, this tutorial will show you how to style each post differently by adding some code snippets in your Blogger posts. Please note that this trick won't work if you have implemented the auto-read more function.
How to Change the Background Color of a Blogger Post
Step 1. Log in to your Blogger account, click on your blog and press the 'New Post' button.Step 2. Once you have finished writing the post, switch to the 'HTML' tab and add the following code just at the beginning and at the end of the post content - see the screenshot below for more info.
<div style="background-color: #444; color: #fff; padding: 10px;">
Your text goes here...
</div>
Note:
- replace the hex value in blue to change the background color and the color value in green with the color of the post's text. You can use this Color Code Generator tool to pick your favorite color.
- "Your text here...." is where the Post content should go, i.e. between the <div style="..."></div> tags.
How to Add a Background Image in a Blogger Post
If you want to add a background image in a post, add the following code just at the beginning and end of the post content:<div style="background: url(IMAGE-URL-HERE); background-size: cover; color: #000; padding: 10px;">Your text goes here...
</div>
Note:
- paste the URL address of your hosted picture (use Photobucket, Tinypic etc.) where it says IMAGE-URL-HERE
- the line in red and the </div> tag has to be added at the beginning and at the end of the post's HTML.
- if the background image is dark, then you will need to change the text color - replace the #000 color value with #fff
- "Your text here...." is where your Post content should go.
Step 3. Now click the 'Publish' button and you are done.
Thanks for posting this, I was trying to figure out how to do this, and now it's working!
Now I wonder how to style the comments so they look sort of consistent with the posts...
I found some great information in your blog. This blog is very useful and helpful to me. Thank you for sharing this information with us informative .. I love your blog……
Nice... Can u please tell how to change the colour of background? I mean to ask can I use different colour?
Hi, thanks for this. I have a follow-up question. I am trying to create a border around a table with a graphic, so I need the image background to be centered. I put your code inside the (center) html but it stays left aligned. Is there anyway to center the background image?
thanx
thanks
thanks buddy!!! this is very useful!
how to resize that bg image?
Great!
Thank you very much!
Very useful together with a lot of fantasy!
Thanks Buddy..., You helped a lot
Thanks, worked for me :)
nice tutorial
Awesome post. 'div' element belongs to css, right? Does that mean I can post in my blogger blog with css included?
thank you so much bro its simple and helpful
Amazing! Thank you! :)
:o thank you! this is a great help!