Carry out the following steps:
concrete5 themes usually ship with a few default templates, one of them usually named
left_sidebar
. Let's create it by copyingdefault.php
in a new file namedleft_sidebar.php
.We're going to add two sub
DIV
elements to hold our left and main column:<?php defined('C5_EXECUTE') or die(_("Access Denied.")); $this->inc('elements/header.php'); ?> <div id="content"> <div id="left-sidebar"> <?php $as = new Area('Sidebar'); $as->display($c); ?> </div> <div id="main"> <?php $b = new Area('Main'); $b->display($c); ?> </div> <div class="clear"></div> </div> <?php $this->inc('elements/footer.php'); ?>
As we've added new HTML elements, we also have to insert a few more CSS rules in
main.css
, as follows:#left-sidebar { float: left; width: 250px; margin-right: 30px; } #main { float: left; width: 600px; } .clear { clear: both; }
Let's create...