How to make it a 2 column theme with a more narrow sidebar?
- Open theme's
index.phporMain Index Templatefile from the right sidebar inPresentation > Theme Editor. Scroll to the bottom of its content and inside<div id="content-sub">you will see:<div id="content-sub" class="bb-t12 bb-fc">
<div class="bbin-a1">
<div class="bb-tbase">
<?php dynamic_sidebar('sidebar-default'); ?>
</div>
<div class="bb-tbase">
<div class="bb-t13 bb-fa"><div class="bbin-c1">
<?php dynamic_sidebar('sidebar-postnav'); ?>
</div></div>
<div class="bb-t16 bb-fc">
<?php dynamic_sidebar('sidebar-links'); ?>
<?php dynamic_sidebar('sidebar-postrelated'); ?>
</div>
</div>
<div class="bb-tbase">
<?php dynamic_sidebar('sidebar-bottom'); ?>
</div>
</div>
</div> bb-t12class sets the width ofcontent-subto 12 units (out of 30) which is12/30 x 100 = 40%.bb-fcsimply floats the column to the right. Insidecontent-subis an additional<div>tag with a classbbin-a1which sets the left padding (thus a) of the sidebar.- However, the reason why currently there are three columns is this:
where<div class="bb-tbase">
<div class="bb-t13 bb-fa"><div class="bbin-c1">
<?php dynamic_sidebar('sidebar-postnav'); ?>
</div></div>
<div class="bb-t16 bb-fc">
<?php dynamic_sidebar('sidebar-links'); ?>
<?php dynamic_sidebar('sidebar-postrelated'); ?>
</div>
</div>sidebar-postnavwidget is placed inside a 13 unit wide column (bb-t12) which is aligned left (bb-fa), whilesidebar-linksandsidebar-postrelatedare in a second column which is 16 units wide (bb-t16) and floated to the right (bb-fc). Classbb-tbaseis simply a column base (float:left; width:100%; clear:both;) in which you place the columns. - Notice that
13 + 16 = 29 unitswhich leaves 1 unit spacing between these columns. Also the 13 unit column has an inner<div>which sets the right side padding (bbin-c1, thusc). - To remove the two additional columns inside the sidebar, simply put the widget "boxes" one after another:
<div class="bb-tbase">
<?php dynamic_sidebar('sidebar-postnav'); ?>
<?php dynamic_sidebar('sidebar-links'); ?>
<?php dynamic_sidebar('sidebar-postrelated'); ?>
</div> - If you want to make the whole sidebar more narrow, change the sidebar wrapper from
to<div id="content-sub" class="bb-t12 bb-fc">...</div><div id="content-sub" class="bb-t8 bb-fc">...</div>
- Don't forget the adjust the width of the main content accordingly, from
to<div id="content-main" class="bb-t18 bb-fa">...</div><div id="content-main" class="bb-t22 bb-fa">...</div>
- Remember that the sum of column width inside one base should not exceed 30 units. You can always view the CSS Snippets as a reference.
Basic HTML structure of this theme
<div id="soul">
<div id="soul-content" class="bb-tbase">
<div id="header">
<div class="bb-t18 bb-fa">
Logo
</div>
<div id="nav-main" class="nav-h bb-t12 bb-fc">
Main Navigation
</div>
</div>
<div class="bb-tbase">
<div id="content-main" class="bb-t18 bb-fa">
<div class="bbin-c3">
Main Content
</div>
</div>
<div id="content-sub" class="bb-t12 bb-fc">
<div class="bbin-a1">
Sidebar Content
</div>
</div>
</div><!--content-->
<div id="footer" class="bb-tbase">
Footer Content
</div>
</div>
</div>
<div id="soul-content" class="bb-tbase">
<div id="header">
<div class="bb-t18 bb-fa">
Logo
</div>
<div id="nav-main" class="nav-h bb-t12 bb-fc">
Main Navigation
</div>
</div>
<div class="bb-tbase">
<div id="content-main" class="bb-t18 bb-fa">
<div class="bbin-c3">
Main Content
</div>
</div>
<div id="content-sub" class="bb-t12 bb-fc">
<div class="bbin-a1">
Sidebar Content
</div>
</div>
</div><!--content-->
<div id="footer" class="bb-tbase">
Footer Content
</div>
</div>
</div>
