When removing the left sidebar, im left with this big open space. How to i go about removing that? -what im trying to say is, i want to take whats in the content area and expand it to cover where the left sidebar is supposed to be at.

http://img408.imageshack.us/img408/7292/snapshot4qi1.jpg

how do i remove that^

Comments

metalforever’s picture

http://img234.imageshack.us/img234/7713/snapshot4ea2.jpg

A picture indicating what i wish to get rid of.

nevets’s picture

For some theme simply removing the sidebar div is enough. For others the content has a left margin that must be descreased

metalforever’s picture

Im still having a hard time trying to get rid of these margins, everything from the left sidebar is totally gone(in the css), i tried editing the content's width, floating it to the left, messing with the margins to no avail.

Are there any other things that could possibly help me out? Im using the "base" theme, but only to apply my own layout. Perhaps there is a module available that could provide help?

nevets’s picture

This is based on the original theme, you may need to adjust for any changes you have made. In page.tpl.php replace

    <?php if ($sidebar_left): ?>
		<div id="sidebar1">
			<?php print $sidebar_left ?>
		<!-- end #sidebar1 --></div>
	<?php endif; ?>	
  
    <?php if ($sidebar_right): ?>
		<div id="sidebar2">
			<?php print $sidebar_right ?>
		<!-- end #sidebar2 --></div>
    <?php endif; ?>
  
	<div id="mainContent">

with

    <?php if ($sidebar_left): ?>
		<div id="sidebar1">
			<?php print $sidebar_left ?>
		<!-- end #sidebar1 --></div>
	<?php else: $main_class = "no-left"; ?>
	<?php endif; ?>	
  
    <?php if ($sidebar_right): ?>
		<div id="sidebar2">
			<?php print $sidebar_right ?>
		<!-- end #sidebar2 --></div>
		<?php else: $main_class = (isset($main_class) ? "no-sidebars" : "no-right"); ?>
    <?php endif; ?>
  
	<div id="mainContent" <?php if(isset($main_class)) print 'class="' . $main_class . '"'; ?>>

Which will add a class to mainContent based on which sidebars are not present (no-left, no-right, or no-sidebars)

Then in style.css, after

.page #mainContent {
 	margin: 0 15em 0 15em; /* the right margin can be given in ems or pixels. It creates the space down the right side of the page. */ 
	padding: 0 2em 0 2em; /* padding here creates white space "inside the box." */
} 

add

.page #mainContent.no-left {
 	margin: 0 15em 0 0em; /* the right margin can be given in ems or pixels. It creates the space down the right side of the page. */ 
}

.page #mainContent.no-right {
 	margin: 0 0 0 15em; /* the right margin can be given in ems or pixels. It creates the space down the right side of the page. */ 
}

.page #mainContent.no-sidebars {
 	margin: 0 0 0 0; /* the right margin can be given in ems or pixels. It creates the space down the right side of the page. */ 
}
metalforever’s picture

THANK YOU.