How to Embed Images as Background
Blogger Template Design: Tutorial 12
- Tutorial 11: Starting Your Own Blogger Template
A background image can be placed in any container - either inside the Body container (which fills up the entire screen), inside the Post, Sidebar, Comment, or even on a header container (say, a Comment Header). For example, if you look at the Minimalizt template, you'll see that the Comment Header below the post is a rounded green button - which is an image embedded inside the Comment Header.
You can also use an image to create a shadowy-looking side frame (now quite common in blogs). See the Hazy template to see how it looks. To do this, you create a short background image with a long span that fills the whole width of the template. At the right and left edge of the background image, you create the shadowy pattern (or any other pattern that you want to be the frame), and embed this inside the outer-wrapper container, repeating it vertically.
But, how to embed and how to repeat the image vertically, horizontally, or both in directions?
To Embed Background Image:
Say that you want to use a 100 x 100 pixels image as the background image inside the Sidebar1 container. What you need to do is find the sidebar1 {...} container in CSS Styling and add the following code in red (the other codes are just sample codes):
#sidebar1 {
margin: 0px 10px 15px 10px;
padding: 0 0 0 0;
width: 150px;
background: URL(http://the-url-of-your-image) repeat left top;
text-align: left;
}The "background:..." code will embed whatever image at whatever URL you put and repeat the pattern both vertically and horizontally. The location of the starting image will be on the left-most side, and at the top-most position. The general command for embedding a background image is:
background: URL(http://...) repeat-command x-position y-position;All Repeat Command:
- no-repeat (the image won't be repeated at all)
- repeat (repeat horizontally and vertically)
- repeat-x (only repeats horizontally)
- repeat-y (only repeats vertically)
- left (puts the starting image on the left-most side)
- center (puts the starting image at the center)
- right (puts the starting image on the right-most side)
- top (puts the starting image on the top-most position)
- center (puts the starting image at the center)
- bottom (puts the starting image on the bottom-most position)




23 comments:
Hi, What happen to your blog template? I saw that all of your template only contain 1 column.
Hi, thanks for informing me. But, I saw that everything is okay, both in Firefox and IE7. All templates have 2 sidebars and 1 main column. Are you using different browsers?
Hi
Pardon, but I dont seem to follow, what if you want to put an image/photo as yr complete background, instead of the simple color background provided by blogger?
Of course ones posts will cover the image partly but that would look good esp if you post a drawing to yr background.
Regards
G
Retraction
It seems to work well, thanks alot, to see go to raumars.blogspot.com, its an experimental blog.
All I did was change 'background" (in Body) and nothing else and have an image hosted by someone.
Thanks, very appreciated.
How are you with favicons?
And do yours work with IE7?
gourney detoure,
I don't know how to use favicons yet, but all my templates have been tested well in IE7.
ozdGF7 Your blog is great. Articles is interesting!
fmUOhb Thanks to author.
Good job!
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
Hello all!
Good job!
Magnific!
Please write anything else!
Hello all!
Nice Article.
7QBxe1 Good job!
Wonderful blog.
Hi,
All of those sample sites are gone from Blogger! Could you give a new example please. Your site and templates are v useful, many thanks.
This is one of the best and informative post that i've read so far about designing a blogger theme. Thank you for sharing. Especially for someone is about to start a venture into desiging and creating websites, this give him/her a very good head start.
Thank you once again... Happy Bloggin.
All of the links to view the sample templates are dead.
TQVM..this tutorial was awesome..
good job
Thanks for you motivations
Post a Comment