successfully resize captions dynamically.