Support » Themes and Templates » Bizarre container DIV height problem

  • Resolved ryanhbowman

    (@ryanhbowman)


    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/

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi

    (@esmi)

    Forum Moderator

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

    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?

    esmi

    (@esmi)

    Forum Moderator

    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.

    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…

    esmi

    (@esmi)

    Forum Moderator

    No problem. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bizarre container DIV height problem’ is closed to new replies.