WordPress sidebar positioning

I have a sidebar which I want to postion at the left side of my content. I’ve tried everything I could think of but can’t get the sidebar to show in the left part of the page.

    <div class="container">
        <header>

        </header>
    <?php if ( is_active_sidebar( 'primary' ) )  {?>
 <div class='cats'>
    <?php dynamic_sidebar( 'primary' );  } ?>
  </div>
        <div class='content_wrapper'>
        <?php if ( have_posts() ) : ?>
        <?php /* Start the Loop */ ?>
        <?php while ( have_posts() ) : the_post(); ?>

        <div class="posts">
            <article>
               <div class="wrapper">
               <h2 class='headline'><a href="<?php the_permalink() ?>"></h2>

                <div class='thumbs'>

                <p><?php echo content('120'); ?></p>
            </article>
            //.....
                    // some code
               </div>
            </div>
         ... some more code

Related posts

Leave a Reply

1 comment

  1. Please Put this after header, so you can have sidebar at left
    
    <?php get_sidebar(); ?>
    

    and for dynamic side bar use this css

    .container
    {
        margin:auto!important;
    }
    .cats
    {
        float:left;
        width:30%;
    }
    .content_wrapper
    {
        float:right;
        width:68%;
    }