"Float Top" for sidebar help! (3 posts)

  1. maximumsavage
    Posted 3 years ago #

    Hello Friends!

    I've finally created my div's and borders, but now I can't seem to "float" my sidebar on the right to the top.


    I've tried putting the sidebar div in other areas but this seem to be the only one that works. I just can't seem to get it to float at the top of the div.

    <?php get_header(); ?>
    <div id="main-column">
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            <div id="post-<?php the_ID(); ?>" class="post">
    		<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h2>
    		<div class="post-meta">
    			<li><?php the_time('F j, Y') ?></li>
    			<li>Section: <?php the_category(', '); ?></li>
    			<li><?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?></li>
    			<li class="perma"><a href="<?php the_permalink() ?>">Permalink</a></li> </ul>
    			<div class="entry">
    				<?php the_content('Read the rest of this entry &raquo;'); ?>
            <!--end post wrapper-->
    		<?php endwhile; ?>
    		<?php else : ?>
    		<div class="post">
    			<div class="post-meta-2">
    				<p class="container">
    					<span class="date">No Matches</span>
    			<h2>No matching results</h2>
    			<div class="entry">
    				<p>You seem to have found a mis-linked page or search query with no matching results. Please trying your search again. If you feel that you should be staring at something a little more concrete, feel free to email the author of this site or browse the archives.</p>
    		<?php endif; ?>
    		<div id="paginate-index" class="fix">
    			<p><span class="left"><?php previous_posts_link('&laquo; Previous') ?></span> <span class="right"><?php next_posts_link('Next &raquo;') ?></span></p>
    <div id="sidebar-primary" class="sidebar">
    	<?php dynamic_sidebar( 'primary' ); ?>
    <?php get_footer(); ?>
  2. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

    You need to wrap your posts with a <div> and apply that to have a width of 681px and float it left. Then

  3. jrav001
    Posted 3 years ago #

    You need to close the "main-column" div BEFORE calling the sidebar.

Topic Closed

This topic has been closed to new replies.

About this Topic