WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Bizarre container DIV height problem (6 posts)

  1. ryanhbowman
    Member
    Posted 3 years ago #

    For some reason when I pull in posts and separate them into columns on a page the container DIV freaks out. I can't for the life of me figure it out. I have looked for any heights set anywhere and there are none. It seems to only happen when I put the float on the DIV that makes the posts move into columns.

    Help! Thank You!

    Check it out, the gray box is the container.
    http://southwarkplayhouse.co.uk/New_Site/whats-on/

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Start by sorting out the markup errors. Then move onto the CSS errors.
    http://codex.wordpress.org/Validating_a_Website

  3. ryanhbowman
    Member
    Posted 3 years ago #

    Thanks esmi and good point, should've done it before I asked too....anyway, it is validated now except for the font-face stuff which according to other folk doesn't validate in CSS2.

    Alas, the problem is still happening.

    Any ideas?

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    You need to add a "clearfix" to the enclosing container as the last few boxes are all floated. something like:

    /* clear all floats */
    #content:after {
        content: ".";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;
    }

    should fix it.

  5. ryanhbowman
    Member
    Posted 3 years ago #

    Thanks very much, I had never seen the :after thing before, it is cool. I made a clearthis class that does what you said and it works like a charm. Thanks again...

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    No problem. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic