Back Home

Open Designs

Community. Driven.

  1.  
    For some reason, my sidebar in the Wordpress theme I created shows up at the bottom of my page, not the top. Does anyone know what could be going wrong? Here's the index code:
    <div id="holdall">
    <?php
    get_header();
    ?>

    <!-- <div id="main"> -->

    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php the_date('','<h2>','</h2>'); ?>

    <div class="post" id="post-<?php the_ID(); ?>">

    <h3 class="storytitle">
    <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>

    <div class="meta">
    <?php _e("Filed under:"); ?> <?php the_category(',') ?> —
    <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?>
    </div>

    <div class="storycontent">

    <?php the_content(__('(more...)')); ?>
    <!-- <div border="1px dashed"></div>
    </div> -->
    </div>

    <div class="feedback">

    <?php wp_link_pages(); ?>

    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

    </div>


    <?php comments_template(); // Get wp-comments.php template ?>
    <br><hr align="center" style="dashed"><br>
    <?php endwhile; else: ?>

    <p>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    </p>

    <?php endif; ?>

    <?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>



    <?php get_footer(); ?>

    </div> <!-- closing main div -->
    <br>

    </div>
    <?php
    get_sidebar();
    ?>

    <!-- </div> -->

    </div>


    And the CSS goes something like:

    body {
    margin: 0px 0px 0px 0px;
    padding: 0px 0px 0px 0px;
    font-family: verdana, arial, helvetica, sans-serif;
    color: #333;
    background-color: #FFF;
    }
    a {
    text-decoration: none;
    font-weight: bold;
    color: #333;
    outline: none;
    }
    a:visited {
    color: #333;
    }
    a:active {
    color: #333;
    }
    a:hover {
    color: #333;
    text-decoration: underline;
    }
    .ahem {
    display: none;
    }
    strong, b {
    font-weight: bold;
    }
    p {
    font-size: 12px;
    line-height: 22px;
    margin-top: 20px;
    margin-bottom: 10px;
    }


    h1 {
    font-size: 24px;
    line-height: 44px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
    }
    h2 {
    font-size: 18px;
    line-height: 40px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
    }
    h3 {
    font-size: 16px;
    line-height: 22px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
    }
    h4 {
    font-size: 14px;
    line-height: 26px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
    }
    h5 {
    font-size: 12px;
    line-height: 22px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
    }
    h6 {
    font-size: 10px;
    line-height: 18px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
    }
    img {
    border: 0;
    }
    .nowrap {
    white-space: nowrap;
    font-size: 10px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
    /* must be combined with nobr in html for ie5win */
    }
    .tiny {
    font-size: 9px;
    line-height: 16px;
    margin-top: 15px;
    margin-bottom: 5px;
    }
    #content {
    float: left;
    padding: 10px 2% 10px 2%;
    border: 0px;
    background: #FFF;
    width: 75%; /* ie5win fudge begins */
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 71%;
    }
    html>body #content {
    width: 71%; /* ie5win fudge ends */
    }
    #content2 {
    float: left; /* Opera5.02 will show a space at right when there is no scroll bar */
    padding: 10px 2% 10px 2%;
    border-right: 2px dashed #000000;
    background: #FFF;
    width: 25%; /* ie5win fudge begins */
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 21%;
    }
    html>body #content2 {
    width: 21%; /* ie5win fudge ends */
    }
    #header {
    float: left;
    width: 100%;
    padding: 10px 2% 10px 2%;
    /* border-bottom: 2px dotted #111111; */
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 98%;
    }
    #margin {
    float: left;
    width: 10%;
    padding: 10px 0% 10px 0%;
    /* border-bottom: 2px dotted #111111; */
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 10%;
    }
    html>body #margin {
    width: 10%; /* ie5win fudge ends */
    }
    #footer {
    float: left;
    width: 100%;
    padding: 10px 2% 10px 2%;
    border-top: 1px dashed #000000;
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 98%;
    text-align: center;
    }

    pre {
    font-size: 12px;
    line-height: 22px;
    margin-top: 20px;
    margin-bottom: 10px;
    }
    #holdall {
    float: left;
    width: 80%;
    margin: 10px 10% 10px 10%;
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 78%;
    }
    hr {
    height: 1px;
    width: 100%;
    }


    The sidebar just inserts
    sidebar

    What could I be doing wrong?
    •  
      CommentAuthorjanpd24
    • CommentTimeApr 26th 2007
     
    Move this


    <?php
    get_sidebar();
    ?>


    further up, either just below get_header(); or inside the content div, depending on how you want it styled. Play with it a bit.
    •  
      CommentAuthorarwen54
    • CommentTimeApr 27th 2007
     
    no, the problem is in the width of your columns...one is 75% and the other is 25%...it won't work.
    adjust the larger column down to 74 or 73%...play with that for a bit until they line up properly.
    •  
      CommentAuthorjanpd24
    • CommentTimeApr 27th 2007
     
    Oh, I thought he wanted the sidebar to load first (I do the same!) tongue