Html 引导网格导出div容器

Html 引导网格导出div容器,html,twitter-bootstrap,gridview,Html,Twitter Bootstrap,Gridview,我试图将2input放在一个引导网格中,它们在div容器的外部,在左侧或右侧 然而,代码看起来还行: <div style="max-width:500px;margin:auto;"> <div style="background-color:red;"> Test! </div> <div class="row"> <div class="col-sm-6" style="backgro

我试图将2
input
放在一个引导网格中,它们在div容器的外部,在左侧或右侧

然而,代码看起来还行:

<div style="max-width:500px;margin:auto;">
    <div style="background-color:red;">
      Test!
    </div>
    <div class="row">
        <div class="col-sm-6" style="background-color:blue;">
            <input name="InputName" type="text" width="100%" placeholder="Your name" style="width:100%;margin: 0; border-radius:0;border: 1px solid rgba(0,0,0,.1);height: 50px;">
        </div>
        <div class="col-sm-6" style="background-color:yellow;">
            <input name="InputEmail" type="text" width="100%" placeholder="Your email" style="width:100%;border-radius:0;border: 1px solid rgba(0,0,0,.1);border-left:0;height: 50px;">
        </div>
    </div>
</div>

测试!
这里是a,第一个
col-sm-6
的红色背景位于左侧的div容器外部,第二个
col-sm-6
的黄色背景位于右侧的div容器外部

为什么?

谢谢你的帮助。

这是因为

.row {
    margin-right: -15px;
    margin-left: -15px;
}
还有与你的风格相关的风格

padding-right: 15px;
padding-left: 15px;
因为

.row {
    margin-right: -15px;
    margin-left: -15px;
}
还有与你的风格相关的风格

padding-right: 15px;
padding-left: 15px;

是的,我明白了,这是因为默认的引导边界和网格系统的填充。谢谢:)没问题:)。你能投我的票吗?我需要与我的问题相关的聊天。谢谢是的,我明白了,这是因为默认的引导边界和网格系统的填充。谢谢:)没问题:)。你能投我的票吗?我需要与我的问题相关的聊天。谢谢