While you can do a lot with the CSS layout feature in concrete5, it might be the case that you have to surround your block with some HTML code to style your site the way you want it to look like. There's a simple way to add some wrapping code around each block in an area, as follows:
Once more, open a theme template like
default.php
and look for the place where you create the area.Replace the PHP block using the following snippet:
<?php $b = new Area('Main'); $b->setBlockWrapperStart('<div class="mainBlock">'); $b->setBlockWrapperEnd('</div>'); $b->display($c); ?>
The two lines of PHP code we've inserted in the preceding snippet simply surround each block in the Main
area with a DIV
element.
When you now create your CSS file, you can access them using .mainBlock
. A few lines in your CSS file like the following will add a line at the bottom of each block:
.mainBlock { border-top: 1px solid black; }