Added horizontal scrolling to scrollToElement