json-schema-form / angular-schema-form

Generate forms from a JSON schema, with AngularJS!
https://json-schema-form.github.io/angular-schema-form
MIT License
2.47k stars 653 forks source link

class="form-horizontal" not getting applied on json-schema-form ?? #785

Closed sandeep048 closed 7 years ago

sandeep048 commented 8 years ago

I cannot get the form to style as expected. I would like the control labels align to the left and the form elements to the right. Highly appreciate if I can get hold of a working example.

sandeep048 commented 8 years ago

Some thing like this. Horizontal form layout?

image

Anthropic commented 8 years ago

@sandeep048 you use CSS to change layout, for example this will set your label and the control to inline instead of acting like a block which is half the way there.

.form-group label {
    display: inline-block;
    width: 170px;
}
.form-control {
    display: inline-block;
    width: 330px;
}

You will find much better CSS help on Stack Overflow than here though, so i suggest asking for styling help there with the source output from your form.