2 things...
1. you need to create a variable which checks to see if modules are assigned to a position
at the top of the index.php add in a variable directly after the $app variable:
Code:
$myResize = ($this->countModules('atomic-sidebar') or $this->countModules('position-3') or $this->countModules('position-4') or $this->countModules('position-5') or $this->countModules('position-6') or $this->countModules('position-7') or $this->countModules('position-8'));
This checks all the positions on the right side for assigned modules. If no modules are assigned it stores a "false" otherwise if one is assigned you get a "True"
2. You need to check the variable and according to true of false you must assign the appropriate class
Code:
<div class="<?php echo $myResize ? 'span-16 append-1': 'span-23 last';?>">
This code then checks for a true or false... if true is assigns span-16 ... false it does span-23
In your index file replace the class with the code to check for the modules
Code:
<div class="span-7 last">
<jdoc:include type="modules" name="atomic-sidebar" style="sidebar" />
<jdoc:include type="modules" name="position-7" style="sidebar" />
<jdoc:include type="modules" name="position-4" style="sidebar" />
<jdoc:include type="modules" name="position-5" style="sidebar" />
<jdoc:include type="modules" name="position-6" style="sidebar" />
<jdoc:include type="modules" name="position-8" style="sidebar" />
<jdoc:include type="modules" name="position-3" style="sidebar" />
</div>
it should look like this
Code:
<div class="<?php echo $myResize ? 'span-16 append-1': 'span-23 last';?>">
<jdoc:include type="modules" name="atomic-sidebar" style="sidebar" />
<jdoc:include type="modules" name="position-7" style="sidebar" />
<jdoc:include type="modules" name="position-4" style="sidebar" />
<jdoc:include type="modules" name="position-5" style="sidebar" />
<jdoc:include type="modules" name="position-6" style="sidebar" />
<jdoc:include type="modules" name="position-8" style="sidebar" />
<jdoc:include type="modules" name="position-3" style="sidebar" />
</div>
hope that helps...