Using borders and backgrounds for the main areas of your blog are simple techniques which can achieve dramatic stylistic effects.
Borders and background colors help separate areas of your blog, and can be used to highlight important content, such as your blog posts, or features in your blog sidebar.
Most importantly, backgrounds and borders don't require you to have extensive knowledge and skill with creating and using images. Instead you can use simple colors, or generate tiled backgrounds to create a completely unique template for your blog.
Here are some of my favorite examples of how borders and backgrounds can be used to separate content:
This is this excellent design exemplifies the theme of this post perfectly. Thick borders and simple backgrounds immediately convey which areas are important.
Here colored backgrounds are put to great effect, with only fine borders beneath elements to add a sense of perspective.
The border and background colors are varying shades of the same palette: subtle changes in color add depth to each element of this theme.
After seeing these examples, you're probably wondering how you may achieve these same effects in your Blogger templates! So allow me to explain the basics of adding backgrounds and borders to your blog.
Different styles for borders
There are many ways to set the properties for borders in your blog template. In this tutorial, I will only explain the basic concepts to help you get started.
The easiest method of all to add a border to an element of your template is to add border properties for a particular blog element in the <b:skin> section of your Blogger template.
For example, the "#main-wrapper" section in most Blogger templates refers to the main posts section. To add a border to this section, we could add a line like this:
#main-wrapper {
border: 3px solid #000000;
[other properties here]
}
This will reproduce a 3 pixel wide, solid black border, like this:Using this example, you could also change the color, and width of the border, like this:
Borders don't have to be solid!
Instead of solid borders, you could add different properties to create unusual effects such as:
border: 3px dotted #000;
border: 5px dashed green;
border-style: double; border-color: blue;
border-style: outset; border-color: #404040;
Different styles for backgrounds
Backgrounds can either be a flat color (defined as a hex value, such as #000000) or as an image (which is defined by the URL of the image).
Flat color backgrounds are easily created by adding the hex color value of the image as a property in the style section of your Blogger template. For example, if I wanted to add a yellow background color to my sidebar, I could add the line in red to the #sidebar-wrapper properties in my template code, like this:
#sidebar-wrapper {
background: #ffcc00;
[other style properties here]
}To use an image as a background for a section of your template, you will need to host the background image online, and define the image by linking to the URL of the image, like this:
#sidebar-wrapper {
background: url(http://imagehost.com/yourimage.jpg);
[other style properties here]
}You can also combine color and image background properties, like this:
#sidebar-wrapper {
background: #ffcc00 url(http://imagehost.com/yourimage.jpg) no-repeat top left;
[other style properties here]
}
The example above would feature an image at the top left of the sidebar, while all other space would be yellow.You can read more about adding background images to your Blogger blog in this previous article.
Combining Border and Background Properties
This is where the border and background properties can become very stylish when applied to elements of your Blogger template.
By combining
border: 5px solid #666666;
background: #333333;
border: 3px outset #99cccc;
background: #99cccc url(http://imagehost.image.jpg);
Where could you add border and background styles in your Blogger template?
The main sections of your Blogger template would be the header, posts section, sidebar(s) and the footer section.
The style properties for these sections in your template would probably look like this:
- Header Section - #header-wrapper or #header-wrap
- Main Posts Section - #main-wrapper, #main-wrap or #main
- Sidebar(s) - #sidebar-wrapper, #sidebar-wrap, #sidebar or .sidebar
- Footer Section - #footer-wrapper, #footer-wrap or #footer
If you edit any of these sections in the <b:skin> section of your Blogger template, be sure to check if there are already any border or background properties defined. If there are, you will need to edit these sections, rather than add more new ones. Otherwise your edits will not appear the way you would like them to look!
Remember: you can always preview changes before saving your template! Then if you decide you don't like the changes you have made, you can click the "clear all edits" button and begin again.
Experiment with different styles!
Using properties for the borders and background properties of the different sections in your template, the style possibilities are endless! Try different color schemes, contrasting borders and backgrounds, and experiment with tiling images to see what would work well for your own blog design.
Here are some useful resources to help you use borders and background images in your own Blogger template designs:
- CSS Border Properties: Learn more about using borders
- Web Color Calculator: Find the hex values of your favorite colors
- Color Blend: Find the perfect color scheme for your blog design
- Stripe Generator: Create striped backgrounds
- Squidfingers: My favorite resource for tiling image backgrounds
I hope this post has helped you learn more about border and background properties. Please let me know how you have used these techniques in your own designs by leaving your comments below.



26 Comments:
Mimbo Pro is a great example of how you can do so much with so little. Nice article, you did a solid job of explaining borders and background to new users.
Thanks for stopping by Vinh Le :) I'm glad you agree with me about the style of Mimbo Pro. I also see similar properties in Brian Gardner's designs: excellent designs based on simple concepts. I hope my tutorial conveys that the same can be achieved in Blogger powered blogs too.
Hey thanks alot, I really appreciate the work it took to put this tut together. Thanks!!
Thanks Amanda for this post. I did not know that you can use different border styles (I only know of the straight lines). I love your blog!
I notice you may have the author higlighting hack. I was wondering how do you get it to call your comments and seperate them without changing your name/idenity to something new? I did follow hackospre hack but it looks like it don't work.
For Tori:
You're most welcome, I'm glad to know this post was useful for you. Thanks for stopping by!
For Babette:
Yes there are a few different styles you can use to display borders using only CSS. I only listed the main ones here, though if you follow the link for "CSS Border Properties" in the resources section, you can see even more. Thank you for your lovely comments :)
For Anonymous:
You've brought up a good point there, this is something I haven't thought of writing about before. My template includes code for author and non-author comments so I am able to style them easily. I'll take a look at Hackosphere's tutorial to see why this may not be working for you.
Thank you all for your comments :)
Hi!
This is very helpful. I applied one on my blog : http://anyfreebies.blogspot.com
Thanks,
Minette
Is there a way to add a border with the old templates? I can add it around the header and footer, but not around the content (as a whole--I can around the main portion of the content and the sidebar, but they don't line up with the header and footer).
I'd use the new templates, but I prefer to upload directly to my server.
Hello
Amanda, do you happen to know what the width of a background picture should be in order to take up the whole screen?
Thanks
How do i make my main sections transparent? could u share wif me the code?
Tys alot
Hi Amanda,
This site of yours helped me a lot. It's well writen and easy to follow.
Thanks
Thanks for all the tips.
But how can we style comments?
Specifically how can I add borders to comments like what you have here?
thanks
Great tips here. How can I add a decorative jpg. border vertically along each side of the main body portion (header, posts + sidebar)? I think it's the outer-wrapper, but I can't figure out how to add a decorative line image in the code to separate the background from the main portion. Any suggestions?
This is my question too, Kristen. I would like to add a decorative border on either side of my "blog" as well. Can't figure it out either. I will check back to see if you come up with something :) Thanks for all your great help Amanda! This is a really great source...you make it very easy to understand and still help get the job done! Thanks!!!
Jess
I LOVE Your blog Amanda, I use it all the time to help me design my blog. So question, I incorporated borders and background color into my sidebar and it applies to all my widgets.
This is what the code looks like:
.sidebar .widget, {
border: 4px outset #80746E;
background: #CCCCAF;
margin:0 0 1.5em;
padding:10px 10px 10px 10px;
}
I would like to be able to have the borders surrounding only some widgets or have them be different colors. Any suggestions about how to change the code so that it doesn't apply to all of them? You can check out my blog here: http://www.freewire.myprmusicwire.com/
Thanks in advance!
I'm trying to figure out the same thing as Meagan. I've been having a blast the last few days fixing up my blogger template, but as I add more widgets to my (hopefully) business blog, I want to be able to give individual widgets their own backgrounds and borders.
Thank you so much! I was able to incorporate this styling into my blog. You made it so easy to understand!
www.screweduptexan.com
I want border as thin as possible than 1px ? how can i do this? In mozilla browser table border looks very thick can you give me other option to table border so that table rows and columns should also display border.
send me reply at umesh_nevase@yahoo.com
Thanks, this was super helpful.
is there a way to turn on all borders for every element at one time? I need it to coordinate layout of page elements.
thank you.
This worked beautifully - thank you!
Thanks so much I applied it already, the double one.I also book mark your site so no need for me to search again when I need it again.
hi amanda, i have been a constant reader here in your blog and it really helped me a lot. am just concentrating on learning how to do it. my question about the border if you want something not just a lines or dots but something like a spiral notebook or whatsoever.
Hi Amanda, I added a dotted border around my header and love it--thanks so much for the great tutorial. Now I am wanting to add borders like the ones on http://allsorts.typepad.com/allsorts/. Each category has a dotted border and her posts have left and right dotted borders. I don't see a line for main wrapper in my layout html template. My url is http://iweararedhat.blogspot.com. Any chance you can help me out again?
Lucy
Oh! I have a border around both my header and posts. I am soooooo loving your tutorials. Thank you, thank you thank you...
WOW! I have been looking for a tutorial like this for weeks. THANK YOU!!
Post a Comment