2
           
            
                
     
    
    You can test the presence of the left/right columns, and change your columns container class according to this. I did that in my Zeta Reticuli theme:
 <{if $xoBlocks.canvas_left and $xoBlocks.canvas_right}> 
<{assign var=columns_layout value='threecolumns-layout'}> 
<{elseif $xoBlocks.canvas_left}> 
<{assign var=columns_layout value='leftcolumn-layout'}> 
<{elseif $xoBlocks.canvas_right}> 
<{assign var=columns_layout value='rightcolumn-layout'}> 
<{/if}> 
<div class="<{$columns_layout}>"> 
  .... write columns and center as usual .... 
div>  
(please note that this is for 2.0.14, you have to change the name of the variables you test in older versions: 
$xoBlocks.canvas_left was 
$xoops_lblocks in 2.0.13, and 
$xoBlocks.canvas_right was 
$xoops_rblocks).
Then you can make several CSS rules that ensure the center column is displayed correctly (you won't need the same rules depending on the method you use to get a CSS based layout, but it's for you to get the idea):
 #centercolumn { 
    background: #fff; 
    padding: 0px; 
} 
.leftcolumn-layout #centercolumn, .threecolumns-layout #centercolumn { 
    padding-left:    170px; 
} 
.rightcolumn-layout #centercolumn, .threecolumns-layout #centercolumn { 
    padding-right:        190px; 
}