Welcome to The Real Blogger Status - Beta. Please note the warnings (as of 6/13: 0 active), and the alerts (as of 1/10/2007: 5 active).

Please be aware of the naming variances in this blog. You will find various references to "Classic" / "Old Template 2006" Blogger, and to "Beta" / "New Template 2006" Blogger.

Monday, November 27, 2006

Using Background Images

Background images make the blog so much more colourful than plain old solid colour backgrounds. A background image

  • Is not clickable.
  • Shows up only where no foreground content is present.

(Note): This post has been migrated to (and improved in) The Real Blogger Status: Background Images In Your Blog.

Look at using a background image under the text title, for instance. Note that this is the opposite from replacing the text in the title with a picture. If you put a picture in the title, no background will be visible, unless you intentionally make the picture too small for the title space, or use a transparent .gif file for an image.

We do this using CSS rules. Look in the template for
#header-wrapper {
margin:0 auto 10px;
border:0px solid $bordercolor;

Change that to
#header-wrapper {
margin:0 auto 10px;
border:0px solid $bordercolor;
background: url(http://whatever.wherever.com/what.gif) no-repeat 0px 0px;

The CSS object "header-wrapper" is the Beta standard name for the screen area which will contain the text blog title and blog description. If you have, separately, tweaked your header, any of the above settings may differ. Just add the "background" rule.

If you have a Classic blog, your template may or may not use a CSS rule to define the header. It may or may not use a CSS object "header-wrapper". Be aware of the possibilities. You could, conceivably, have a <div> tag, with all of the rules defined there in the HTML.
<div style="width:660px; margin:0 auto 10px; border:0px solid $bordercolor;"> ... </div>

if so, change that to
<div style="width:660px; margin:0 auto 10px; border:0px solid $bordercolor;background: url(http://whatever.wherever.com/what.gif) no-repeat 0px 0px;"> ... </div>

You can apply a background image to any area in the blog, not just the header.
body {
background: url('whatever.wherever.com/what.gif');

With any large screen area, your image will probably be smaller than the area being covered. You'll probably not use "norepeat", so your background image gets reused, repeatedly, in a checkerboard pattern, over the entire area.

For more information, see the W3Schools tutorial: CSS Background


karoline said...

when i try to change the template, i'm using minima dark, i get this error message..

More than one widget was found with id: LinkList1. Widget IDs should be unique.



Al said...

When I added an image to my background, it messed with the color that is behind the posts. Where there used to be white, there is now simply my image repeating. I thought I had forgot to include the white in my design, but it seems to work how I wanted it to on Safari, but it's all out of whack on Firefox.

What can I do to fix this? Where did I mess up?

The html for the background portion is:

body {
margin: 0;
padding: 0;
border: 0;
text-align: center;
color: #554;
background: #692 url('http://img.photobucket.com/albums/v404/tnytotoro/Sidenotes.jpg');
font: small tahoma, "Bitstream Vera Sans", "Trebuchet MS", "Lucida Grande", lucida, helvetica, sans-serif;