appending dropdown to html element if document has no body