Solved the issues in placing submit button, based on the number of pets in the page.