Article Series: 3 Column Templates Step by Step Guides
This tutorial will provide the steps to modify a Blogger default 2 column Rounders 4 template in to a three column template. This modification will add a new sidebar to the left side of the main post column.
(If you really want to know the under the hood details of what's happening here, read the article series Three Column Templates Explained.)
This guide is specific for Rounder 4. For other Rounders templates, see the article series home. Also note that this guide will only work for a new sidebar of 240 pixels wide. That's because the required background images provided in this tutorial are set to that size. If you need custom sizes, please contact me.
1) First we need to add a new CSS id selector for the new sidebar wrapper.
- Go to Layout -> Edit HTML
- Locate the #sidebar-wrap selector (Do a Find using your browser)
- Copy that full section and paste below the existing sidebar section (it doesn't have to below) and rename it to #left-sidebar-wrap
- Change the float: $endSide to float:$startSide of the #left-sidebar-wrap selector (See the code snippet below)
width:240px;
float:$endSide;
margin:15px 0 0;
font-size:97%;
line-height:1.5em;
word-wrap: break-word; /* fix for long ... IE */
overflow: hidden; /* fix for ... float */
}
#left-sidebar-wrap {
width:240px;
float:$startSide;
margin:15px 0 0;
font-size:97%;
line-height:1.5em;
word-wrap: break-word; /* fix for long ... IE */
overflow: hidden; /* fix for long non-text ... float */
}
2) Now we introduce a new div element, which will be the placeholder for the second sidebar
- Locate the <div id='main-wrap1'> element.
- Copy the code shown in red, above that section (this has to be above)
<div id='crosscol-wrapper' style='text-align:center'>
<b:section class='crosscol' id='crosscol' showaddelement='no'/>
</div>
<div id='left-sidebar-wrap'>
<div id='sidebartop-wrap'><div id='sidebartop-wrap2'>
<b:section class='sidebar' id='left-sidebartop'>
</b:section>
</div></div>
<div id='sidebarbottom-wrap1'><div id='sidebarbottom-wrap2'>
<b:section class='sidebar' id='left-sidebar' preferred='yes'/>
</div></div>
</div>
<div id='main-wrap1'><div id='main-wrap2'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div></div>
3) Next step is to increase the width of the parent wrappers so that the new sidebar fits in them
- Locate the CSS section called #outer-wrapper
- Change its width property to 980 pixels
width: 980px;
...
}
4) We also need to do some adjustments to margins, padding etc
- Locate the #left-sidebar-wrap section
- Insert a right margin of 7 pixels. Don't remove the existing 15px. This padding is in addition to that.
width:240px;
float:$startSide;
margin:15px 7px 0 0;
...
}
5) Add the required CSS selectors for the new sidebar.
- Locate the #sidebar h2 selector
- Copy the code shown below, after that selector.
color: #aabbcc;
border-bottom: 1px dotted #aabbcc;
}
#left-sidebartop h2 {
line-height:1.5em;
color:#ffffff;
border-bottom: 1px dotted #ffffff;
font: normal bold 100% 'Trebuchet MS',Verdana,Arial,Sans-serif;
margin-bottom: 0.5em;
}
#left-sidebartop a {
color: #ffffff;
}
#left-sidebartop a:hover {
color: #ffffff;
}
#left-sidebartop a:visited {
color: #ffffff;
}
#left-sidebar a {
color: #99ddbb;
}
#left-sidebar a:hover,
#left-sidebar a:visited {
color: #ffffff;
}
#left-sidebar h2 {
color: #aabbcc;
border-bottom: 1px dotted #aabbcc;
}
/* Footer
----------------------------------------------- */
#footer-wrap1 {
clear:both;
margin:0 0 10px;
padding:15px 0 0;
}
6) Then we have to apply the expanded background images as necessary.
All the Rounders templates use images for the rounded header and footer. We need to expand these images to accommodate the new sidebar.
- Add a template variable to define the image host location as explained here. (This step will open up in a separate window. Return to the next bullet point after that)
- Locate the following CSS selectors.
- Replace the URLs of the images with the ones shown in red below.
background: url("$imageHost/rounders4_corners_cap_top_w.gif") no-repeat $startSide top;
...
}
#header {
background:url("$imageHost/rounders4_bg_hdr_bot_w.jpg") no-repeat $startSide bottom;
...
}
#footer-wrap2 {
background:$titleBgColor url("$imageHost/rounders4_corners_cap_top_w.gif") no-repeat $startSide top;
color:$titleTextColor;
}
#footer {
background:url("$imageHost/rounders4_corners_cap_bot_w.gif") no-repeat $startSide bottom;
padding:8px 15px;
}
7) Finally, modify the CSS rules for the wire frame layouts editor.
- Locate the section that starts with "/** Page structure tweaks for layout editor wireframe */"
- Replace that entire section with the following code.
body#layout #header-wrapper,
body#layout #outer-wrapper,
body#layout #footer-wrap1 {
width:830px;
}
body#layout #main-wrap1 {
width: 485px;
margin-right:10px;
}
body#layout #sidebar-wrap,
body#layout #left-sidebar-wrap {
width:150px;
}
]]></b:skin>
Save the template. Switch to Page Elements view and enjoy your 3 column template! (The new sidebar might not be visible until you add some gadgets to it)
Note: You are free to use the images provided by me. But if you change your template according to this tutorial and use those images, please add the following code shown in red, right to the end of your template, in the place shown. It will simply link to this blog.
<a href="http://bguide.blogspot.com/2008/02/3-columns-step-by-step-guides.html">Three Column Modification</a> courtesy of <a href="http://bguide.blogspot.com">The Blogger Guide</a>
</body>
</html>
Related Posts








9 comments:
Thanx a lot ..this helped me very much. I tried to make my blog of 3 column according to other blogger guides but repeatedly getting error. But your help worked. Thanx again
Very helpful, and your instruction were easy to follow. I even figured out how to switch to 2 right sidebars.
A question for you: This template leaves a block of unused space at the top-right (at least on my blog). Is it difficult to make the sidebars start at the top along with the header, instead of below the header?
My blog: http://giantbattlingrobots.blogspot.com/ (note: This is still the 2-column layout. I have some other changes to make before I make the switch to 3-column)
@ EastwoodDC
From what I understand, if what you suggested is done, then the header is not a conventional header anymore. I think your problem is not having the header image span the fulll length of the header. Hence the appearance of a blank,unused space.
Yes, a wider image would be the other option.
I was looking for a way to actually use that space to get more information onto the first screen that people see. I suppose I could just make it part of the image. --- Thanks again.
thanks...
thank friend
nice post
thanks a lot...
very good explanation and your instruction is very easy to follow.
Now i have 3 column in my blog.
But i still have one problem.
When i change color for the left sidebar top, the right sidebar top also follow the same color. Can i have a different color between these two sidebar?
Thanks, I have 3 columns now. I'm wondering how to get my post in the middle one. Right now it is on the far left. I'm sure there's a way, but novice that I am, I have no idea.
Post a Comment
Thanks in advance for all your comments and suggestions. They are very much appreciated.
IMPORTANT:
If you have a specific technical question, please email me with a description of the problem and the blog's URL.