Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to center bbpress after deleting sidebar


  • mouna84
    Participant

    @mouna84

    Hi there,

    I’m using: wordpress version 3.9.2–de_DE
    bbpress version 2.5.4

    The site I need help with is: http://darjinan.com/forum/

    I deleted the sidebar by copying page.php and renaming it to bbpress.php. But I can’t figure out how to center my forum. Here’s the code:

    
    <?php 
    /**
     * Theme Page Section for our theme.
     *
     * @package ThemeGrill
     * @subpackage Accelerate
     * @since Accelerate 1.0
     */
    ?>
    
    <?php get_header(); ?>
    
    	<?php do_action( 'accelerate_before_body_content' ); ?>
    
    	<div id="primary">
    		<div id="content" class="clearfix">
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'content', 'page' ); ?>
    
    				<?php
    
    					do_action( 'accelerate_before_comments_template' );
    					// If comments are open or we have at least one comment, load up the comment template
    					if ( comments_open() || '0' != get_comments_number() )
    						comments_template();					
    	      		do_action ( 'accelerate_after_comments_template' );
    				?>
    			<?php endwhile; ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    	
    	<?php /*accelerate_sidebar_select();*/ ?>
    
    	<?php do_action( 'accelerate_after_body_content' ); ?>
    
    <?php get_footer(); ?>
    
    

    Can someone please help me? I’m a complete newbie to html and css.
    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

  • Robkk
    Moderator

    @robkk

    try

    .bbpress #content {
    width:100%
    } 

    else try

    .bbpress #content .clearfix {
    width:100%
    }

    mouna84
    Participant

    @mouna84

    Thank you for your answer, but none of them worked even with !important.
    Is there any other possibility?


    mouna84
    Participant

    @mouna84

    this code worked to center the forums, but not the bottom of the page:

    #bbpress-forums {
    width: 900px;
    margin-left: 100px
    }


    Robkk
    Moderator

    @robkk

    remove the #bbpress-forums code you added

    and also the code i gave you before

    use this

    .bbpress #primary {
    float:left;
    width:100%;
    }

    mouna84
    Participant

    @mouna84

    Thank you very much. This finally solved the problem.


    Robkk
    Moderator

    @robkk

    no problem

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar