format the height of the code box to the size of the text