• Hey, Im having a problem with the sidebar displaying below the foot in firefox and I have no idea why. The site codes validates, and the original html/css displays that element in the correct location. Any help is much appreciated because Im very frustrated by this.

    Page Source

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of specific help.

    Thread Starter glibby

    (@glibby)

    Ok, I uploaded the theme to my site since I was developing it offline. The address is https://www.fire-emsgear.com

    If you want your sidebar on the left of the display, it needs to be before the content div in the markup. If you want the sidebar on the right, you need to use float:right; not float:left;.

    You may also need to adjust the width of the content div.

    Thread Starter glibby

    (@glibby)

    Thanks for the suggestions, I’ll try them out. I didn’t code the HTML/css but I thought the reason it’s all float:left is so that all the elements float into each other but then are correctly located thanks to the margins. The sidebar should be to the right of the content, above the footer bar. I’m also confused seeing as how that HTML/ styling when displayed without wordpress works just fine. What is it about coding it for wordpress that would mess it up?

    Thread Starter glibby

    (@glibby)

    AHHHHH! This is so frustrating. Changing the width of the container just makes the posts display side by side and the sidebar is still at the bottom. Its as if the sidebar isnt in the same container as the content so it wont float up no matter how much room there is. I tried calling the sidebar function from within the container loop in index.php but that causes the sidebar to move down the page as more posts are added, which is not what I want. I suppose I could specify a absolute position but that would kill the theme for people viewing at another resolution. Any thoughts?

    Thread Starter glibby

    (@glibby)

    Ok so I sorta fixed it. I added the code to call the sidebar during the loop so now it displays in the correct position. The only problem is it spaces out the top posts a little bit. Im guessing it should be in its own container or something? Im not really sure how to fix that.

    The loop code is

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    					<div class="main_content">
    						<div class="post">
    							<span class="post_title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
    								<div class="post_info">
    									<p>Posted <?php echo get_the_date(); ?> by <?php the_author(); ?> </p>
    									<p>File Under: <?php the_category(', '); ?></p>
    								</div>
    						<div class="post_content">
    							<div class="post_img"><?php the_post_thumbnail(); ?></div>
    							<div class="post_txt">
    								<?php the_content() ?>
    							</div>
    						</div> <!--end of post_content-->
    
    						<div class="post_bar"><a href="<?php the_permalink(); ?>"><?php comments_number('No Comments','One Comment','% Comments'); ?>, Read More</a></div>
    						</div> <!--end of post-->
    					</div>
    			<?php get_sidebar(); ?>	
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    and for the style:

    [CSS moderated as per the Forum Rules.]

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sidebar Drops Below Footer’ is closed to new replies.