|
How do I collapse an empty position in a template |
Very 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"> <?php mosLoadModules ( 'left', -2 ); ?> </div> </div> <div id="content_outer">
with this :
<?php if ( !(mosCountModules( 'left' )) ) { ?> <div id="content_outer2"> <? } else { ?> <div id="left_outer"> <div id="left_inner"> <?php mosLoadModules ( 'left', -2 ); ?> </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; }
|