Is there a way to have a region other than sidebar-second collapse when no content is present, with the adjacent region expanding to take its space?

For example, say I have 2 header regions set to 6:6 columns, and if there's no contents of the 2nd region, the 1st region expands to fill the space of region 2, so that the 1st region would be 12 columns?

This is the way it works with the content area, with the theme inserting the appropriate grid class depending on what regions are rendered, but the same behavior appears absent in other regions. I hope I'm missing something.

Thanks in advance for your help!

Comments

mfby2k’s picture

I am using this code to collapse a region if it have no content.
and it works try it.

<?php
		if($page['links']){
		?>
		<div class="links-wrap">
			<div class="links">
				<?php print render($page['links']); ?>
			</div>
		</div>
		<?php
		}
		?>