Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css Twitter引导一行上的多个div_Css_Twitter Bootstrap - Fatal编程技术网

Css Twitter引导一行上的多个div

Css Twitter引导一行上的多个div,css,twitter-bootstrap,Css,Twitter Bootstrap,这里没有。我想跳同一排。使用一些twitter引导CSS,我会: .row-fluid { width: 100%; *zoom: 1; } .span6{ width: 460px; } .row-fluid .span6 { width: 48.717948717948715%; *width: 48.664757228587014%; } div { position: relative; background: orange; height:

这里没有。我想跳同一排。使用一些twitter引导CSS,我会:

.row-fluid {
   width: 100%;
   *zoom: 1;
}

.span6{
  width: 460px;
}

.row-fluid .span6 {
   width: 48.717948717948715%;
   *width: 48.664757228587014%;
}

div {
  position: relative;
  background: orange;
  height: 5em;
}
我的HTML是

<div class="row-fluid">
<div class="span6">Foo</div>
<div class="span6">Bar</div>
</div>

福
酒吧
Foo和Bar不是一条线。知道我做错了什么吗

以下是JS小提琴:


谢谢。

我不知道bootstrap;但是您似乎错过了
行fluid.span6上的
float:left
检查这是否正常:

您是在使用twitter引导程序还是在复制它的一部分?您只有一小部分css实际定义了
行流体
功能。例如,第一个元素的边距通常会发生变化,以考虑元素周围的额外像素,所有分配了
span*
类的元素都应该是
float:left
,就像mshsayem提到的那样


如果您看看这个,它使用CDN引导,并且您的代码被注释掉,那么就没有问题了。我建议您使用twitter提供的实际css文件,除非您熟悉他们的样式表和css,否则可以对其进行更改。

还有什么额外的css?是你改变的东西还是标准的引导?我问这个问题的原因是,只要有bootstrap,它似乎工作得很好@brbcoding不确定-在这里查看一些我无法完全控制的代码。