mostly fixed the overflow problem by switching to <= and >= instead of == in the checks. also tightened layout up using some absolute positioning. demo is now ready to integrate with the site