WordPress.org

Ready to get started?Download WordPress

Forums

Content Closure Being Stripped (6 posts)

  1. whitesag
    Member
    Posted 1 year ago #

    Hi All - I am total noob and am relying on various blogs and this forum (and of course, the codex) to figure things out here. I am using Firefox to debug and am having a time of it. Basically my content container is breaking on the single.php and comment.php views. At least this is what it looks like to me. I have reviewed the code and it looks as though the hhc-allContent tag which I want to encompass everything is closed.

    I am still styling so there are quite a few items here but I am focusing on this container issue for now:

    Here you can see clearly the hhc-allContent container holds everything as expected. The drop shadow styled against the div makes it easy to define. However, if you were to view the post on its own here or even just view comments, you can see where things are breaking up.

    I am wondering if you pros can point out if there is something I am not taking into consideration here. I have no previous experience with PHP.

    I consider myself an intermediate with HTML/CSS but that is based solely on my teaching myself over the past two years. Here is a link to the template files on dropbox.

    Thank you for any direction!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Firebug should have told you the issue.
    I'm using Google Chrome's equivalent and the issue is apparent [screenshot]. Look at the HTML structure. It is divided.

    It should be this;

    <div id="hhc_header"
     <div id="hhc_pageContent">
     </div>
    </div>
  3. whitesag
    Member
    Posted 1 year ago #

    Wow - I must be missing something structurally for sure then. The Header Div should be wrapped around the content div?

    My line of thinking is that the header is a sub container nested within the pageContent. Your suggestion would reverse that. There must be something logical I am missing because this performs correctly in my test HTML/CSS file (pre-WP import) and is working on the main page.

    Could there be something in the single/comment/etc php files messing this up I am not considering? Why would this not be broken on the index if my structure is the same?

    Sorry for the volley - thank you so much for the response!

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Actually, I'm mistaken.

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

    In the page with the issue, you must be floating some elements that you're not in the page without the issue.

    A common fix to this floating issue is to use the overflow: hidden; style to the parent element that contains the floated elements.

    Add this;

    #hhc_allContent {
     overflow: hidden;
    }
  6. whitesag
    Member
    Posted 1 year ago #

    I only have my right sidebar floating and that should apply to all pages. I did try your first fix and that did wrap everything in the full container however for one reason or another the that broke the structure enough in some other way that the sidebar no longer functioned as desired.

    I may simply go back to square one. If this is working with straight up HTML/CSS the only other element is something in the PHP coding or how I need to divide elements up across the templates.

Topic Closed

This topic has been closed to new replies.

About this Topic