frame alignment issue / text not fitting in the frame

When I run the following code, at first the html text overwrites on the image and then later when I hit refresh, the html text cuts on the page, it does not display the whole text, please check images (screenshot)