Arrange nodes through the DOM tree