$(document).ready(function(){ var lenght = ($('#inner-scroll1 > div').lenght) * 252; $('#inner-scroll1').width(lenght); });
It is necessary to calculate the total width of the internal div (one div is 252px wide) inside # inner-scroll1 and assign it to # inner-scroll1 itself
($('#inner-scroll1 > div').lenght) * 252;
it is not clear that you wanted to achieve this. - zb '