Hi Patrick, The example you have followed is using the deprecated YUI framework. The current way to create modal dialogues in Moodle using using the AMD Modal modal.
One possible solution would be inside the
done method for your AMD Modal, you could do
modal.style.top = '10px'; or
modal.css('top', '10px') if its a jquery object.