8 Background Styles for the Minima Blogger Template (Readers Questions)
Monday, April 7, 2008 /

The Minima template features only one definition for the background property, so if you change the color (or add a background image) this will affect the whole of the template, including the posts area and sidebars.

Over the past few weeks, many people have emailed or commented who would like to know how to add a background image/change the main background color in Blogger's Minima template, while retaining a flat color for the posts and sidebar areas. So in this post, I'll explain how to achieve this.






How backgrounds work in the default Minima template

The only style for a background property in the default (uncustomized) Minima template is for the main body section:

body {

background:$bgcolor;

margin:0;

color:$textcolor;

font:x-small Georgia Serif;

font-size/* */:/**/small;

font-size: /**/small;

text-align: center;

}

None of the other areas in the template have any background properties defined, so if you change the background color (or add an image to the background), all areas of the template will change too.

This can be especially problematic if you try to use a background image, as the text may be very difficult to read against a patterned background!

How to add a different background to the main content area (posts and sidebar)

The main posts section and sidebars in the Minima template are contained in a section called #outer-wrapper. This section is styled in the <b:skin> section (the style area) of your template, like this:

#outer-wrapper {

width: 660px;

margin:0 auto;

padding:10px;

text-align:$startSide;

font: $bodyfont;

}

If you would like this entitr section to have a different background to the sides of your blog (the main body background, you can change this by adding one simple line of code:

#outer-wrapper {

background: #ffffcc;

width: 660px;

margin:0 auto;

padding:10px;

text-align:$startSide;

font: $bodyfont;

}

Here the hex value of #ffffcc will make the main sections of your blog have a cream colored background, like this:

You can of course use any background color you like (check out the web color calculator of you need to find the hex value for your preferred color choice).

Once you have saved your template with the outer-wrapper background in place, you can then change the main background color of your blog in the Fonts and Colors section to any other color you prefer, and this change will not affect the main content of your blog.

Adding a background image to the sides of your blog

If you would prefer to use a patterned background (or background image) for the sides of your Minima template, you can easily do this by adding the URL of your image to the body section, like this:

body {

background:$bgcolor url(http://imagehost.com/your-image-url.jpg);

margin:0;

color:$textcolor;

font:x-small Georgia Serif;

font-size/* */:/**/small;

font-size: /**/small;

text-align: center;

}

This example would add a background image which is repeated across the whole template. It is best used for tiled background patterns, which would then appear like this in your template:

Further resources

I hope this post has explained how to use different background styles in the Minima template. Here are some other articles you may be interested to read too:


8 comments:

February 27, 2009 at 7:30 AM
Anonymous said...

Hello, do you know how I can make all comments show on the main page of the Minima template and not just on the post page?

March 22, 2009 at 11:51 PM
Anonymous said...

OMG! Thanks a bunch. I have been playing around with my template for MONTHS trying to figure this out. Now that I know how to do it, I can't stop fiddling around with it. The only problem I am having now is trying to decide which background I want to go with!

May 21, 2009 at 12:59 AM
Anonymous said...

hiiiiiiiiiii dude good information it worked on my blog

www.mobmani.blogspot.com

make money

June 22, 2009 at 8:32 AM Manju said...

thanks for all these instructions. im working on my new blog now, and this has been so useful
thanks again
xx

June 30, 2009 at 3:34 AM jade said...

I just can not get this to work, I don't know what i'm doing wrong - very frustrating.

July 6, 2009 at 1:12 AM hasuike san said...

hi,.. Thank you for the tutorial,.. Thank you so much,..^^,

August 22, 2009 at 1:09 PM Shelley said...

Thank you so much- I was really hating blogger and thought I was going to need one of those cutesy background template makers- you have saved my sanity!

September 12, 2009 at 8:42 AM jbolte1976 said...

Thank you so much for this. I wish I would have found this sooner. It took me 30 seconds to fix my background issue once I found this.

Thanks again!!

Post a Comment