Return to Snippet

Revision: 30592
at August 17, 2010 23:57 by terrencewood


Updated Code
/**
 * Clear floats when child elements are contained within the bounds of the selected element.
 */
.selected_element {overflow: hidden}

/**
 * Clear floats when child elements are positioned outside the bounds of the selected element.
 */

/**
 * Only needed for IE6 & IE7 if hasLayout has not been triggered by some other property
 * @see http://reference.sitepoint.com/css/haslayout 
 */
.selected_element{display:inline-block}

/**
 * For standards compliant browsers (including IE8+)
 * "\200B" is unicode for ZERO WIDTH SPACE. Neat.
 */
.selected_element:after{clear:both;content:"\200B";display:block;height:0}

Revision: 30591
at August 17, 2010 23:55 by terrencewood


Updated Code
/**
 * Clear floats when child elements are contained within the bounds of the selected element.
 */
.selected_element {overflow: hidden}

/**
 * Clear floats when child elements are positioned outside the bounds of the selected element.
 */

/**
 * Only needed for IE6 & IE7 if hasLayout has not been triggered by some other property
 * @see http://reference.sitepoint.com/css/haslayout 
 */
.selected_element{display:inline-block}

/**
 * For standards compliant browsers (including IE8+)
 * "\200B" is unicode for non printing whitespace. Neat.
 */
.selected_element:after{clear:both;content:"\200B";display:block;height:0}

Revision: 30590
at August 17, 2010 23:52 by terrencewood


Initial Code
/**
 * Clear floats when child elements are contained within the bounds of the selected element.
 */
.selected_element {overflow: hidden}

/**
 * Clear floats when child elements are positioned outside the bounds of the selected element.
 */

/**
 * Only needed for IE6 & IE7 if hasLayout has not been triggered by some other property
 * @see http://reference.sitepoint.com/css/haslayout 
 */
.selected_element{display:inline-block}

/**
 * For standards compliant browsers (including IE8+)
 */
.selected_element:after{clear:both;content:"\200B";display:block;height:0}

Initial URL


Initial Description


Initial Title
Clearing floats with CSS properties

Initial Tags


Initial Language
CSS