Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS what does the following do?

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #39820
    djrolstad
    Participant

    `

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

    #109990
    Senff
    Participant

    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.

    #109991
    Kitty Giraudel
    Participant

    I think we miss the link.

    #110042
    djrolstad
    Participant

    div style=”clear:both;” div

    #110044
    Paulie_D
    Member

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

    #110046
    Kitty Giraudel
    Participant

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

    #110041
    djrolstad
    Participant

    So what is the new technique?

    #110059
    Kitty Giraudel
    Participant
    /* Optional if you don't plan to support IE6/7 */
    .parent-element {
    *zoom: 1;
    }

    /* Modern browsers */
    .parent-element:after {
    content: "";
    display: table;
    clear:both;
    }
    #110065
    lex
    Member

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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.