Forums

[resolved] Right sidebar dropping to bottom of page just in single post (27 posts)

  1. JoeMarGfx
    Member
    Posted 2 years ago #

    Here is my error:
    The right sidebar is dropping to the bottom of the page only in the single post window. On the main wordpress page its in the right placement. I did not change any width parameters but at some point this happened. Go to any of the posts:
    Site is: http://www.fanthreads.com/wordpress/

    You see how on the front page its fine but on a single post page the sidebar is dropping below the ADD COMMENT area. I have a backup of the style.css and even if I put that back Its still there. Could it be coming from the single post css sheet or the theme itself?

    Thanks in advance for help.

    - Joe

  2. do77
    Member
    Posted 2 years ago #

    Did you add anything to your sidebar? The newsletter thing for example? If so, just take it out for once and see if that fixes the problem

    do77

  3. JoeMarGfx
    Member
    Posted 2 years ago #

    I took that out and its still happening. I am only doing the graphics on the site and changing around the colors in the css. I believe that it had been doing it before I did anything because when I put back the original style.css and template DKgreen.css the problem is still there.

  4. do77
    Member
    Posted 2 years ago #

    Yes, then it might be a general problem of the theme. It might has to do with your comment field on the single page. Take a look in your css file, find the comment div and see if it has the float element. If so, take it our for a second and see if that resolves the problem.

    do77

  5. JoeMarGfx
    Member
    Posted 2 years ago #

    Ok I removed the float and resized it to only 580 px (it was 900) now the comments are aligned left and the right sidebar is still at the bottom.

    The right sidebar is still messed up and at the bottom.

  6. S.K
    Member
    Posted 2 years ago #

    The ID comment has a clear property specified as "clear: both" on line 550 of the theme's style.css file. It doesn't allow any floating element (in this case the right sidebar). So it is pushed down.

    You can remove the "clear: both" from the element.

    S.K

  7. JoeMarGfx
    Member
    Posted 2 years ago #

    Hey Kichu I tried commenting out every clear:both and all it did was nothing in 3 places and in the last 2 places it moved the comments above the title block.

  8. JoeMarGfx
    Member
    Posted 2 years ago #

    btw I am using dashcode for mac to do my coding and the line numbers are all different. Line 550 looks to me to be about line 590ish

  9. S.K
    Member
    Posted 2 years ago #

    I could find it still there:

    #comments {
    clear:both;
    margin:0;
    padding:10px 0;
    }

    S.K

  10. JoeMarGfx
    Member
    Posted 2 years ago #

    Hey Kichu,

    I cannot find the code you are showing. I find all comments and none go
    '#comments {
    clear:both;
    margin:0;
    padding:10px 0;
    }'
    Instead I have:

    '#comments {

    padding: 10px 0px; margin: 0px;

    /*clear: both;*/'
    I left it that way and you can see the comments go to the top of the page and the right sidebar is still at the bottom of the page.

  11. JoeMarGfx
    Member
    Posted 2 years ago #

    Hey Kichu did you see what changed by me commenting out clear both? I want to put it back but I dont know if you saw what happened when I changed it.

    I have also commented out every clear:both; in the file and it just ruins the formatting.

  12. JoeMarGfx
    Member
    Posted 2 years ago #

    Ok I guess I will move it back. I am really lost here and could use some help.

  13. S.K
    Member
    Posted 2 years ago #

    Ok
    You can restore them any time.

    But the solution lies in wrapping the comments id also in the id "left" so that the post and comments lie within the float:left declaration.

    You'll have to edit the singles.php of the theme.

    Before that try adding "float: left;" to the #comments without clear: both;.

    If it doesn't work, you'll have to edit the singles php.

    S.K

  14. JoeMarGfx
    Member
    Posted 2 years ago #

    Closer!

    It is now at the same level as the comments section. So what do I edit in the singles.php to get it to play nice?

  15. S.K
    Member
    Posted 2 years ago #

    Sorry! zzzzzzzzzzz!!

    Tomorrow! :)

    S.K

  16. JoeMarGfx
    Member
    Posted 2 years ago #

    EEEK I am so close...

    I am supposed to deliver this today and the only thing holding me up is this damn sidebar. Anyone else have any ideas what I am supposed to edit in the singles.php file to get the sidebar at the top of the page?

  17. do77
    Member
    Posted 2 years ago #

    post the relevant part of your single.php...

  18. JoeMarGfx
    Member
    Posted 2 years ago #

    Being I dont have a clue what Kichu wanted me to change I am unsure what is relevant here so here is the whole single.php:

    <?php get_header(); ?>
    
    <!-- <div id="content"> -->
    
    <div id="container">
    
    <div id="left">
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); // the loop ?>	
    
        <div class="post ">
    
    	<!--post title as a link-->
    
            <h1 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h1>
    
    	<!--post text with the read more link-->
    
    	<?php the_content('<div class="post-more">Read the rest of this entry &raquo;</div>'); ?>
    
        </div>
    
        <!--post meta info-->
    
    <br />
    
    <strong>Posted By: </strong><?php the_author_link(); ?> <!-- The author's name as a link to his archive -->
    
    &nbsp;<strong>Posted On: </strong><?php the_time('m.j.Y') ?><!-- the timestamp -->
    
    &nbsp;<strong>Comments: </strong><a href="<?php the_permalink(); ?>#comments"><?php comments_number('No Comments Yet', '1 Comment So Far', '% Comments Already'); ?></a> <!-- comment number as link to post comments -->
    
    &nbsp;<strong>Categories: </strong><?php the_category(', ') ?> <!-- list of categories, seperated by commas, linked to corresponding category archives -->
    
        </div>
    
    	<?php comments_template(); // include comments template ?>
    
    	<?php endwhile; // end of one post ?>
    
    	<?php else : // do not delete ?>
    
    	<h3>Page Not Found</h3>
    
        <p>We're sorry, but the page you are looking for isn't here.</p>
    
        <p>Try searching for the page you are looking for or using the navigation in the header or sidebar</p>
    
    	<?php endif; // do not delete ?>
    
    <!--include sidebar-->
    
    <div id="right">
    
    <?php get_sidebar(); ?>
    
    </div>
    
    </div>
    
    <!--include footer-->
    
    <!-- </div> -->
    
    <?php get_footer(); ?>
  19. doodlebee
    Member
    Posted 2 years ago #

    Validating your code might help. There's some closed tags that aren't closing anything, and could be messing things up.

    You also might try moving your comments template call to *within* your #left container instead of outside of it.

  20. JoeMarGfx
    Member
    Posted 2 years ago #

    Do77 any thoughts?

  21. do77
    Member
    Posted 2 years ago #

    Copy and paste this code into your single.php. Let me know if that worked:

    <?php get_header(); ?>
    
    <!-- <div id="content"> -->
    
    <div id="container">
    
    <div id="left">
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); // the loop ?>	
    
        <div class="post ">
    
    	<!--post title as a link-->
    
            <h1 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h1>
    
    	<!--post text with the read more link-->
    
    	<?php the_content('<div class="post-more">Read the rest of this entry &raquo;</div>'); ?>
    
        </div>
    
        <!--post meta info-->
    
    <br />
    
    <strong>Posted By: </strong><?php the_author_link(); ?> <!-- The author's name as a link to his archive -->
    
    &nbsp;<strong>Posted On: </strong><?php the_time('m.j.Y') ?><!-- the timestamp -->
    
    &nbsp;<strong>Comments: </strong><a href="<?php the_permalink(); ?>#comments"><?php comments_number('No Comments Yet', '1 Comment So Far', '% Comments Already'); ?></a> <!-- comment number as link to post comments -->
    
    &nbsp;<strong>Categories: </strong><?php the_category(', ') ?> <!-- list of categories, seperated by commas, linked to corresponding category archives -->
    
    <br />
    
    	<?php comments_template(); // include comments template ?>
    
    	<?php endwhile; // end of one post ?>
    
    	<?php else : // do not delete ?>
    
    	<h3>Page Not Found</h3>
    
        <p>We're sorry, but the page you are looking for isn't here.</p>
    
        <p>Try searching for the page you are looking for or using the navigation in the header or sidebar</p>
    
    	<?php endif; // do not delete ?>
    
        </div>
    
    <!--include sidebar-->
    
    <div id="right">
    
    <?php get_sidebar(); ?>
    
    </div>
    
    </div>
  22. JoeMarGfx
    Member
    Posted 2 years ago #

    Doodlebee,

    Thanks but that just opens up so many issues one being Where is the validation being done on? The output says "line 75.." but which file? Its such a mess at the moment. Also where are you talking about when you say;

    You also might try moving your comments template call to *within* your #left container instead of outside of it.

    I just saw your post Do77 let me try that...

  23. JoeMarGfx
    Member
    Posted 2 years ago #

    AHA!!!! That did it!

    Thank you so much Do77... I dont know what you fixed but that did it. Now to figure out what the validator was saying about all this messed up code.

  24. do77
    Member
    Posted 2 years ago #

    Just closed the div with ID=left right before the sidebar. This way the comment section is included as well ;)

  25. doodlebee
    Member
    Posted 2 years ago #

    JoeMarGfx said: "Also where are you talking about when you say;"

    do77 said: "Just closed the div with ID=left right before the sidebar. This way the comment section is included as well ;) "

    That's what I was talking about.

    Validating your code would have shown you that was the issue BTW (That's how I found it). The line numbers are given for the line it's on as the full page is displayed. it tells you parts of the lines that are the issue so you can find them easily, even if you don't have line-numbering. Validation of your code solves these problems about 95% of the time.

  26. JoeMarGfx
    Member
    Posted 2 years ago #

    Thanks doodle, I use line numbers in my software, I just didnt know which file it was referring to.

    Thanks again for your help.

    - Joe

  27. focused313
    Member
    Posted 2 years ago #

    doodlebee, you are a great man!!! Just helped me fix my problem after an hour or more of searching. I tried every possible fix, well I thought I did, atleast in the comments.php. It never occured to me to look in single.php. I love this darn support forum

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.