Support for variable-width child element

Tweaked the way in calculating the size of the container and individual child element in order to support variable-width children.