Updated HTML and styles
Modified isAtPosition condition