I programatically generate an HTML form and position the controls on it like so:
<div class="TComboBox" id="ComboBox1" style="position: fixed; top:16px; left: 16px; wid开发者_如何学JAVAth: 145px; height: 21px;">
Hopefully that is acceptable? The form is generated in a program, on a grid, and I want it to be WYSIWYG, so I am using the same coordinates on the HTML (or trying to, using CSS).
My problem is how to specify the position of the Submit button, which I also add programatically to the HTML. I know the Top/Left of each component on the form, so that means that I know the Top/Left of the the bottom-most component. I want to position the Submit button, say, 25 pixels below that and in the center of the page.
How should my HTMl look with inline CSS? (I don't have a separate CSS file)
<input type="submit" value="Go" style="position:relative; top:25px; left: 50%;">
精彩评论