跨越引导标签的html表单导致奇怪的间距 [英] html form spanning bootstrap tabs causing odd spacing

查看:151
本文介绍了跨越引导标签的html表单导致奇怪的间距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个跨越可切换标签左引导布局的表单。我也使用引导表单控件。从本质上讲,我希望有三个textareas,可以通过选择相关选项卡单独查看,然后在提交时,我将全部三个textarea的内容用来执行更新。



代码位于 http://jsfiddle.net/timburgess/rhNxF/8/

标签的行为与预期相同。但是,在制表符内容中显示textarea时,它与制表符控件间隔很远。看着html,我看不到任何会导致这种情况的东西。我总是可以做一个CSS黑客攻击,但我想知道我是否在这里失去了一些东西?我曾尝试设置不同的span2,span4等类,但它们没有区别。



理想情况下,我希望将制表符旁边的textarea和警告标记

解决方案

这是因为:

  .form-horizo​​ntal .controls {
margin-left:160px;

bootstrap.css 。你需要覆盖你的CSS。


I have a form that spans a toggable tab left bootstrap layout. I am using the bootstrap form controls as well. Essentially, I want to have three textareas which can be individually viewed by selecting the associated tab and then on submit, I take all three of the textarea's content to perform an update with.

The code is at http://jsfiddle.net/timburgess/rhNxF/8/

The tabs behave as expected. However, when displaying a textarea in the tab-content, it is spaced quite a bit away from the tab controls. Looking at the html, I can't see anything which would cause this. I could always do a CSS hack but I am wondering if I am missing something here? I have tried setting different span2,span4,etc classes but they make no difference.

Ideally I want to have the textarea next to the tabs and the alert to the right of the textarea.

解决方案

It's because of:

.form-horizontal .controls {
    margin-left: 160px;
}

in bootstrap.css. You would need to overwrite that in your CSS.

这篇关于跨越引导标签的html表单导致奇怪的间距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆