How to Embed Images as Background
Sponsored linkBlogger 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)
Labels: Make Template, Tutorial
Translate to:
0 Comments:
Previous Posts
- Testing and Viewing in Other Browsers
- Making a 3-Column Template and More ...
- More Explanation about the Body Code
- The Body Section of the Blogger Template Code
- How to Create a Blog Using Blogger
- Big List of Blog Search Engines
- Google Adsense Layout Tips for Maximum Clicks
- Guide for Google AdSense Publishers
- Tips for Avoiding Your AdSense Account Getting Ban...
- 5 Tips to Boost Your Adsense Revenue
Post a Comment
Thanks for your comment.