Javascript 如何将ReactJS引导表单和h1标记并排放置

Javascript 如何将ReactJS引导表单和h1标记并排放置,javascript,css,reactjs,react-bootstrap,Javascript,Css,Reactjs,React Bootstrap,我想将我的FormGroup和我的h1标记水平并排放置。我试过使用display:inlineblock和其他各种东西,但运气不好。以下是我的.css代码: .testingForm { max-width: 320px; } .testingMore { text-align: left; float: right; } 下面是.js代码: <div className="testingForm"> <FormGroup controlId="st

我想将我的FormGroup和我的h1标记水平并排放置。我试过使用display:inlineblock和其他各种东西,但运气不好。以下是我的.css代码:

.testingForm {
  max-width: 320px;
}

.testingMore {
  text-align: left;
  float: right;
}
下面是.js代码:

<div className="testingForm">
  <FormGroup
    controlId="stuff"
    bsSize="large"
  >
    <ControlLabel>Stuff</ControlLabel>
    <FormControl
    />
  </FormGroup>
</div>
<div className="testingMore">
  <h1>Additional Stuff</h1>
</div>

东西
附加材料

您可以创建一个包含表单和标题的元素,并使用
display:flex将其放入
flex
容器中

。表单包装器{
显示器:flex;
}
.测试表格{
最大宽度:320px;
}
h1{
边际上限:0;
}

测试:
附加材料