作者:可心 | 来源:互联网 | 2023-05-18 08:53
I am trying to make a search bar where a green div would be in the middle of the grey one(see http://codepen.io/anon/pen/LRBEvq?editors=1100), and checkboxes, select drop menu, and input field all inline with two buttons - so everything in the same row. I am using Bootstrap to make it responsive but got stuck and can't figure it out.. thank you for all the help!
我正在尝试创建一个搜索栏,其中绿色div位于灰色的中间(请参阅http://codepen.io/anon/pen/LRBEvq?editors=1100),并选中复选框,选择下拉菜单,输入字段全部内联两个按钮 - 所以所有内容都在同一行中。我正在使用Bootstrap使其响应,但卡住了,无法弄明白..谢谢你的帮助!
Here's my html:
这是我的HTML:
.main {
background-color: grey;
width: 1202px;
height: 156px;
margin: 0 auto;
}
.formContainer {
width: 1140px;
height: 85px;
background-color: green;
}
button {
height: 37px;
width: 160px;
}
.choice {
background-color: lightgrey;
height: 37px;
}
.checkbox {
width: 207px;
border: 1px solid white;
}
.choice-select {
width: 173px;
}
.choice-input {
width: 390px;
}
5 个解决方案
But it might be even better to do something like in the bootstrap docs about navbars: http://getbootstrap.com/components/#navbar
但是在关于navbars的bootstrap文档中做一些事情可能会更好:http://getbootstrap.com/components/#navbar