Bootstrap 3.0: How to have text and input on same line?

后端 未结 10 1081
忘掉有多难
忘掉有多难 2021-01-30 10:10

I\'m currently switching my website over to Bootstrap 3.0. I\'m having an issue with form input and text formatting. What worked in Bootstrap 2 does not work in Bootstrap 3.

10条回答
  •  渐次进展
    2021-01-30 10:21

    Straight from documentation http://getbootstrap.com/css/#forms-horizontal.

    Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding .form-horizontal to the form (which doesn't have to be a

    ). Doing so changes .form-groups to behave as grid rows, so no need for .row.

    Sample:

    
      

提交回复
热议问题