Grow your CSS skills. Land your dream job.

Div Overlapping Div

  • # August 15, 2012 at 4:43 pm

    Hello, everyone.

    I know I’m overlooking something very minor here.

    On this page…
    My Reference Link

    …I have a div that holds tags, fp_tag_div myclearingdiv

    I can’t figure out how to keep that inside of the main div, fp_articles

    specifically, you can see where the tags overlap the main div for the “Exclusive Keldeo GameStop Event” article toward the bottom.

    Any help is much appreciated!

    # August 15, 2012 at 4:56 pm

    By putting a class of ‘myclearingdiv’ on it, you’ll be clearing any floats that occur before your tags, not including your tags.

    You can replace that with ‘clearfix’ and then add the following to your CSS: http://css-tricks.com/snippets/css/clear-fix/

    # August 15, 2012 at 5:04 pm

    Thanks for the quick reply, Doc.

    I already have a clearfix property in my CSS and it looks like this, which should work.

    .clearfix:after {
    clear: both;
    content: ".";
    display: block;
    height: 0;
    visibility: hidden;
    }

    …but when I change this:

    to this, in Firebug:

    …nothing seems to change.

    # August 15, 2012 at 5:11 pm

    Sorry, you’ll want to add the clearfix class to . fp_articles

    # August 15, 2012 at 5:14 pm

    Genius!

    Thanks, Doc. I really appreciate the diligence! Love you guys. :)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".