• Bob G

    (@shoestringwebs)


    I have adjusted divs to eliminate validation errors but still have this problem:

    The sidebar drops below the content on single pages, but only for non-logged in visitors. If I log in, the sidebar displays correctly.

    Any assistance would be greatly appreciated: http://www.talkgwinnett.com

Viewing 10 replies - 1 through 10 (of 10 total)
  • I don’t see a problem in my browser, and I’m not logged in. Sidebar is correctly positioned for me.

    I see the problem when I view the page in Firefox and I am not logged in.

    I just had the problem of the sidebar popping below the content on the “single” posts only. I am using a template I downloaded from Word Press.

    The solution I came up with is to go into the comment.php file and delete the extra </div> code at the end of the page PLUS made sure the COMMENT box was a size that fit into the content area. This works for me in both IE and Firefox. Still have problems with it? Then look at the image size in the sidebar and the css width for the sidebar and container areas. Hope this helps.

    Take care,
    ~Wendy Shepherd

    Thread Starter Bob G

    (@shoestringwebs)

    Thanks for the help, Wendy. My solution probably isn’t perfect, but it works.

    I removed the div tag at the end of the comment.php file as you suggested, but had to add a div tag at the end of single.php, just before the sidebar tag.

    The page no longer validates, but it works. If I knew CSS a bit better, I could probably figure out what the problem is.

    Thread Starter Bob G

    (@shoestringwebs)

    My solution didn’t work after all.

    The sidebar drops below the content when I am not logged in, so the comment box isn’t the problem. When the comment form is displayed, the sidebar is correct.

    It is obviously a problem with the theme’s CSS. I can move the sidebar around by adding div tags in various places, but then the sidebar displays incorrectly under other circumstances. (I know enough about CSS to be dangerous.)

    Can anyone recommend a tool that can help sort out CSS problems, especially considering the WordPress loop at the various pages involved?

    You still have invalid markup on the page. Both for the homepage and for single pages. Those ‘div’ problems are just the sort of thing that will cause weird behavior like this.

    Thread Starter Bob G

    (@shoestringwebs)

    Here is a problem page. It validates, but the sidebar still falls to the bottom when not logged in:

    http://www.talkgwinnett.com/2009/georgia-legislative-watch-with-assessment-cap-pols-treat-symptom-but-ignore-the-cause/

    OK. I’ll take another shot.

    Looks like you have ‘page’ -> ‘inner’ -> ‘content’ -> ‘sidebar’ on the broken page, but ‘page’ -> ‘bottom’ -> ‘sidebar’ on the front page– the working one. The basic layout of both pages is the same so why such different structure?

    But to specifics… Firebug tells me that on that ‘georgia-legislative’ page ‘sidebar’ is exactly where you told it to be– nested inside the ‘content’ section. ‘content’ has a width of 520px so there isn’t anywhere for it to go but below the post content. Of course, I’m speaking as someone not logged in. If this works for a logged in user, it is a bit of puzzle why. Does the page validate for a logged in user?

    Thread Starter Bob G

    (@shoestringwebs)

    I have continued to test. The sidebar appears correctly on posts for which comments are closed (currently set at 30 days) for both logged in and not.

    I am guessing, but it seems that something is out of place on comments.php

    I have disabled all plugins, so they aren’t the problem.

    Thread Starter Bob G

    (@shoestringwebs)

    apljdi, with your assistance I have apparently solved this problem.

    There was a missing div close tag in comments.php just before


    <?php else : ?>
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

    You helped me by reminding me that I had a Firefox addon similar to Firebug that I never use, and by explaining how the sidebar was included within “content”. Then it was just a matter of figuring out where “content” should close for non-logged in viewers.

    Well, you must be making progress because that ‘georgia-legislative’ post looks OK now and some pages that didn’t validate earlier do validate now. The homepage still has an end ‘<div>’ with no start ‘<div>’ though.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Sidebar below content, but only when not logged in’ is closed to new replies.