
This guide will take you through the steps of converting the Blogger template Minima into a three column layout as demoed at http://m3c.compender.com. At the end of the tutorial, the source will be provided.
To begin, we will first examine the #header-wrapper (or #main-wrapper) section of the style sheet to figure out our current overall width:
#header-wrapper {
width:660px;
margin:0 auto 10px;
border:1px solid $bordercolor;
}
As you can see, the Minima template's content area uses a total 660 pixels. If we look at the #main and #sidebar styles we find:
#main-wrapper {
width: 410px;
float: $startSide;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
#sidebar-wrapper {
width: 220px;
float: $endSide;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
The total area used by content is only 630 pixels wide (main 410 + sidebar 220) leaving a 30 pixel spacer (outer/header 660 - content 630) between the posts area and the sidebar.
Now that we have the current layout figured out by the numbers, we can begin converting our template by making room for the new sidebar. Since we know the current design of Minima is pleasing on the eyes, we are going to preserve the current ratios of sidebar to content and simply add room for another sidebar (220 pixels). We will also include a spacer (30 pixels) between our new sidebar and our post area.
Change the #header, #outer, and #footer wrappers from 660 to 910 pixels (sidebar 220 + spacer 30):
#header-wrapper {
width:910px;
margin:0 auto 10px;
border:1px solid $bordercolor;
}
#outer-wrapper {
width: 910px;
margin:0 auto;
padding:10px;
text-align:$startSide;
font: $bodyfont;
}
#footer {
width:910px;
clear:both;
margin:0 auto;
padding-top:15px;
line-height: 1.6em;
text-transform:uppercase;
letter-spacing:.1em;
text-align: center;
}
Now that we have room for it, we will add our new sidebar wrapper by copying and pasting #sidebar-wrapper and giving a new name as well as setting the float to the appropriate side:
#sidebar-wrapper {
width: 220px;
float: $endSide;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
#sidebarLeft-wrapper {
width: 220px;
margin-right: 30px;
float: $startSide;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
Finally, we need to add the HTML/Blogger Code to activate/show our new sidebar. In the HTML you are going to want to find the main and sidebar divs:
<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div>
<div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='Profile1' locked='false' title='About Me' type='Profile'/>
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'/>
</b:section>
</div>
Copy the entire sidebar-wrapper section and paste it before main-wrapper, rename it sidebarLeft and remove the duplicate widgets:
<div id='sidebarLeft-wrapper'>
<b:section class='sidebar' id='sidebarLeft' preferred='yes'>
</b:section>
</div>
<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div>
<div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='Profile1' locked='false' title='About Me' type='Profile'/>
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'/>
</b:section>
</div>
The template conversion is now complete. If you navigate to the page elements settings, you will now be able to add to your newly created sidebar:
Download/view the source for the Minima three column template.