Return to Snippet

Revision: 25280
at March 25, 2010 11:44 by sherpa


Initial Code
//using jquery
 
var width = 0;
 
$('#id-of-container-element').each(function() {
    width += $(this).outerWidth( true );
});
 
//optionally set the width of the container element
$('#id-of-container-element').css('width', width);

Initial URL


Initial Description
For overflow-x, helpful to have total width of inner divs and set the parent. This uses jQuery 1.3.2

Initial Title
Calculate Width of Inner Divs

Initial Tags


Initial Language
jQuery