Apply a natural box layout model to all elements