Looking at this example: http://angular-formly.com/#/example/bootstrap-specific/advanced-layout
What makes the fields display horizontally? Is it the row
class on the field group? Or at the col-xs-6
classes on the individual fields (when looking just at the First/Last name fields)?
I am asking because at my work we are unable to use the twitter bootstrap (arg!) and I am having trouble making fields get on the same lines like this example when not using the bootstrap.
Do you have to use the bootstrap classes in order to get fields on the same row?
3
Answers
CSS. They are wrapped in a div with the col-xs-6 class applied. That class is floated left and has a width of 50%.
https://jsfiddle.net/6njkou1g/
Use
col-xs-6
for two columns.http://jsfiddle.net/rwfje779/
Depending on the browser support you need, you might consider this example which doesn’t require bootstrap at all and instead uses flexbox to do layout. Otherwise, what Brian said about implementing a subset of bootstrap’s grid system yourself wouldn’t be too tricky…