twitter-bootstrap 用于缩进表单中的子字段的引导类

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18585575/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 18:13:07  来源:igfitidea点击:

Bootstrap classes to indent sub fields in a form

twitter-bootstrap

提问by MONTEREY01

Example Site -> http://env-1124382.jelastic.servint.net/restaurant/?timezone=Etc/GMT0

示例站点 -> http://env-1124382.jelastic.servint.net/restaurant/?timezone=Etc/GMT0

  1. When you click on online ordering allowed, I like maximum order amount field to be nested to the right. M of Maxiumum should be straight under the checkbox. How do I do it with bootstrap?
  2. When you click on add open close order times couple of times, you will notice there is no horizontal space between the boxes. I like it to be aligned like point 1. How do I do it with bootstrap?
  1. 当您单击允许在线订购时,我喜欢将最大订单金额字段嵌套在右侧。Maxiumum 的 M 应直接位于复选框下方。我如何用引导程序做到这一点?
  2. 当您单击添加打开关闭订单次数几次时,您会注意到框之间没有水平空间。我喜欢它像第 1 点一样对齐。我如何使用引导程序做到这一点?

回答by SaurabhLP

You have to do some small css stuff to do this..

你必须做一些小的 css 东西才能做到这一点..

For pt. 1, just build a class to margin the checkbox left...

对于pt。1,只需构建一个类来将复选框左侧边距...

.check-margin10 { margin-left:10px; /* Set as you wish */ }

Add it in:-

将其添加到:-

<input type="checkbox" value="true" onclick="enableDisableOnlineOrderingOptions(this)" name="onlineOrderingAllowed" id="onlineOrderingAllowed" class="check-margin10">

Same as pt. 2,

pt相同2

.horizon-margin10 { margin-bottom:10px; /* Set as you wish */ }

add like this:-

像这样添加:-

<div id="MONDAY0" class="form-inline horizon-margin10">

Thanks...

谢谢...