问题
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