Reason for the complex calculation is that, I don't want to restrict the content author to go with the pre-defined ratio's. Bootstrap already gives the CSS class, all I need to do is, use it.I have finally figured out the issue. I should have re-initialized the for loop to 0. Silly me :) Thanks anyw...