• [ Moderator Note: Please post code or markup snippets between backticks or use the code button. Single quotes don’t work, but you get points for trying. ?? ]

    I was successful in removing the sidebar from my page template, but now when I try and make the page full width, there is a huge white block where the sidebar used to be. The text DOES stretch underneath the white–I just can’t seem to figure out how to remove this white block for this page template.

    Here is the page template:

    <?php
    /*
    Template Name: No Sidebar
    */
    ?>
    <?php get_header(); ?>
    <div style="width:850px !important;">
    <?php the_post(); ?>
    
    	<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
    		<header>
    			<?php if(!tk_is_wpsc_page() && !is_tax()){ ?>
    				<h2><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    			<?php } ?>
    
    			<?php if(!is_page() && !tk_is_wpsc_page() && !is_tax() ){ ?>
    				<p><time datetime="<?php the_time('Y-m-d')?>">Posted <?php the_time('F jS, Y') ?></time> <span class="author">by <?php the_author() ?></span>. <?php if ( comments_open() ) : ?><a>#comments"><?php comments_number('0 Comments', '1 Comment', '% Comments'); ?></a><?php endif; ?></p>
    			<?php } ?>
    		</header>
    
    		<?php the_content(__('More', 'tokokoo')); ?>
    
    	</article>
    
    	<?php  if(!tk_is_wpsc_page()) comments_template(); ?>
    
    <?php get_footer(); ?>

    and here is the container part of my css

    Layout
    ============================================================================= */
    #container {
      width: 984px;
      margin: 0 auto;
      zoom: 1;
      position: relative;
      top: -10px;
      z-index: 1;
    }
    #container:after {
      content: ".";
      display: block;
      clear: both;
      visibility: hidden;
      line-height: 0;
      height: 0;
    }
    #container:before {
      content: "";
      display: table;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    First thing I would be looking for is an empty div somewhere which results in a white block on your page.

    Also, I can’t find a closing div tag for the following bit in your code:
    <div style="width:850px !important;">

    There should be a
    </div>
    somewhere

    Could that be (part of) the problem?

    Thread Starter hpgray

    (@hpgray)

    I added </div> both directly after <div style=”width:850px !important;” and also at the end of the php the post after the comments_template line.

    Neither seemed to help. It brought the text back into the original container and kept a huge white space on the right.

    please post a link to a page with that template;

    – just looking at code does not make it easy to make any suggestions.

    Thread Starter hpgray

    (@hpgray)

    I fixed it—turns out I needed to change the css for .blogpage to expand the width.

    thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove Sidebar–now have huge white space’ is closed to new replies.