The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Remove Sidebar--now have huge white space (5 posts)

  1. hpgray
    Posted 4 years ago #

    [ 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:

    Template Name: No Sidebar
    <?php get_header(); ?>
    <div style="width:850px !important;">
    <?php the_post(); ?>
    	<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
    			<?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 } ?>
    		<?php the_content(__('More', 'tokokoo')); ?>
    	<?php  if(!tk_is_wpsc_page()) comments_template(); ?>
    <?php get_footer(); ?>

    and here is the container part of my css

    ============================================================================= */
    #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;
  2. temeraire
    Posted 4 years ago #


    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

    Could that be (part of) the problem?

  3. hpgray
    Posted 4 years ago #

    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.

  4. Michael
    Forum Moderator
    Posted 4 years ago #

    please post a link to a page with that template;

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

  5. hpgray
    Posted 4 years ago #

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


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.