Correct html.prev and html.next near block elements