Grow your CSS skills. Land your dream job.

what does the following do?

  • # September 13, 2012 at 11:24 am

    `

    `
    And when can I use this? starting to get into web development. I saw this being used a lot

    # September 13, 2012 at 11:30 am

    What does a colon do is what you’re asking? Could do a lot of things, depending on the context. You’ll have to be a lot more specific.

    # September 13, 2012 at 11:33 am

    I think we miss the link.

    # September 14, 2012 at 10:13 am

    div style=”clear:both;” div

    # September 14, 2012 at 10:15 am

    Basically, it clears floated elements to ensure that the element it is applied to appears underneath any floated elements.

    # September 14, 2012 at 10:20 am

    This technique is getting old, progressively disappearing. We’re not using extra HTML element to clear floats anymore.

    # September 14, 2012 at 11:45 am

    So what is the new technique?

    # September 14, 2012 at 11:48 am
    /* Optional if you don't plan to support IE6/7 */
    .parent-element {
    *zoom: 1;
    }

    /* Modern browsers */
    .parent-element:after {
    content: "";
    display: table;
    clear:both;
    }
    lex
    # September 14, 2012 at 1:09 pm

    You can read about the best solution (clearfix) [here](http://nicolasgallagher.com/micro-clearfix-hack/)

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

You must be logged in to reply to this topic.

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