Expand content if sidebar isn't used I've been learning Drupal myself for over a year now. I've mainly used templates all the time and changed the css. This time I made my own template and put php in it for the first time. Everything worked but I was wondering how I can expand my content box if a sidebar isnt used? Oh, I'm using Bootstrap's css

Snippet of php:

&lt;div class="container"&gt;
&lt;div class="row"&gt;
    &lt;?php if ($page['sidebar_first']): ?&gt;
  &lt;div id="sidebar-first" class="column sidebar span4"&gt;&lt;div class="section"&gt;
    &lt;?php print render($page['sidebar_first']); ?&gt;
  &lt;/div&gt;&lt;/div&gt; &lt;!-- /.section, /#sidebar-first --&gt;
&lt;?php endif; ?&gt;
&lt;div id="content-area" class="span4"&gt;
          &lt;?php print render($page['content']) ?&gt;
        &lt;/div&gt;


    &lt;?php if ($page['sidebar_second']): ?&gt;
      &lt;div id="sidebar-second" class="column sidebar span4"&gt;&lt;div class="section"&gt;
        &lt;?php print render($page['sidebar_second']); ?&gt;
      &lt;/div&gt;&lt;/div&gt; &lt;!-- /.section, /#sidebar-second --&gt;
    &lt;?php endif; ?&gt;
    &lt;/div&gt;
&lt;/div&gt;


They all have span4 but what I want is when sidebar 1 isn't used, then content id changes to span8
I think the simplest solution would be:

&lt;div id="content-area" class="span&lt;?php echo $page['sidebar_first'] ? '4' : '8'; ?&gt;"&gt;