no longer calculating totalHeight, total height is equal to (bottom margin + y and height of last tag)