Absolute position of controls in a form

Hello,

i am currently searching for a way to place the controls in my form (described in JSON) with the absolute position, that means i want to manually set the x and y values for each button, etc.

Can anybody help me, if already throughsearched the documentation and the web (without any success)

Thanks in advance

Stefan

Please check working demo dhtmlx.com/docs/products/dht … ition.html

Sorry, was on vacation, thanks a lot, it really worked very well.

But, when I am trying to define a css-class for each form-item, nothing seems to really work. I just made my css-code for each item separately:

[code]*, html {
margin: 0;
padding: 0;
}

.Button2 {
position: absolute;
width: 194px;
height: 26px;
left: 14px;
top: 243px;
overflow: hidden;
}

.Button1 {
position: absolute;
width: 194px;
height: 26px;
left: 253px;
top: 243px;
overflow: hidden;
}

.GroupBox1 {
margin: 0; padding: 0;
}

.GroupBox1 fieldset {
position: absolute;
margin: 0; padding: 0;
height: 202px;
width: 442px;
top: 26px;
left: 5px;
}

.txtUser {
position: absolute;
width: 318px;
height: 21px;
left: 108px;
top: 47px;
}

.txtPassword {
position: absolute;
width: 318px;
height: 21px;
left: 108px;
top: 75px;
}[/code]

…for the elements, described such…

[code]var formData = [
/{type: “settings”, position: “absolute”},/
{type: “button”, name: “Button2”, value: “OK”, className: “Button2”, command: “save”},
{type: “button”, name: “Button1”, value: “Abbrechen”, className: “Button1”, command: “save”},
{type: “fieldset”, className: “GroupBox1”, name: “”, label: “”, list:[

{type: “input”, value: “txtUser”, className: “txtUser”},
{type: “input”, value: “txtPassword”, className: “txtPassword”}

]}
];

var myForm = new dhtmlXForm(“frm”, formData);[/code]

in one case the buttons have less width than those 194px and in the other case far more than 194px. I tried to look for margins / paddings with Firebug, i also tried it on several browsers.

Anybody got an idea, how those elements are properly aligned with an absolute position and css?

To use absolute position of form elements you should use “labelTop”, “labelLeft”, “inputTop”, " inputLeft" attributes