html form spanning bootstrap tabs causing odd spacing

≡放荡痞女 提交于 2019-12-08 04:46:56

问题


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.


回答1:


It's because of:

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

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



来源:https://stackoverflow.com/questions/10694961/html-form-spanning-bootstrap-tabs-causing-odd-spacing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!