1st September 2010: Developed 825 websites; Servicing Daily 5,100 Websites!

   
Text Size

How do I collapse an empty position in a template

path-logo.pngVery often the question is asked on how to collapse the left column in a template. Here is a method on how to do this with for instance in the very popular Rhuck_Solarflare_ii:

in /templates/Rhuk_Solarflare_ii/index.php replace this:
<div id="left_inner">

</div>
</div>
<div id="content_outer">
with this :
<?php
if ( !(mosCountModules( 'left' )) ) {
?>
<div id="content_outer2">

<div id="left_outer">
<div id="left_inner">

</div>
</div>
<div id="content_outer">
<?
}
?>
then in the /templates/Rhuk_Solarflare_ii/template_css.css file
add this:
 #content_outer2 {
padding: 0px;
margin-top: 0px;
margin-left: 0px;
/** border: 1px solid #cccccc; **/
float: left;
width: 800px;
}