adjust height of TOC according to position on page