autosize gallery width