Added window size handler, and right positioning if content extends off window.
merge