I have a web page with a set of buttons across the top. I am writing a function to place a form to the right of the rightmost button when it is clicked. I am using the following JavaScript code.
var optionsForm = document.createElement("form");
optionsForm.setAttribute('method',"post");
optionsForm.style.display = "inline";
MakeDropDown(optionsForm); // Make drop-down list element
document.getElementsByTagName('body')[0].appendChild(optionsForm);
However it places the form/drop-down list at the bottom of the page instead of just to the right of the buttons at the top. I would prefer not to have to use absolute positioning since I want the form to be just to the right of the right-most button and there may be a different number of buttons.