Laravel Bootstraper在控制组中并排排列两个元素

时间:2013-03-23 22:37:16

标签: php html css twitter-bootstrap laravel

我想使用Laravel Bootstraper实现此布局:


enter image description here

我的代码如下所示:

<?php
   echo Form::control_group(
      Form::span6_text('something', 'Test 1'),
      Form::span6_text('something', 'Test 2'),
      Form::span6_text('something', 'Test 3')
   );
?>

问题: Bootstraper将每个表单元素包装在单独的div.control-group中,并且第三个元素没有显示:

<小时/> enter image description here

<div class="control-group &lt;input class=" span6"="" type="text" name="something" value="Test 3" id="something">"&gt;<input class="control-label span6" type="text" name="something" value="Test 1" id="something">
<div class="controls">
<input class="span6" type="text" name="something" value="Test 2" id="something">
</div>
</div>

这样的事情可以用Bootstraper来完成吗? :d
谢谢!

1 个答案:

答案 0 :(得分:0)

JS Fiddler Example

<div class="small">Control group</div><div class="container well span6"><div class="control-group" >
    <input class="control-label" type="text" name="something" placeholder="Input text element" id="something">
    <input class="control-label" type="text" name="something" placeholder="Input text element" id="something">
    <div class="controls">
        <input class="span3" type="button" name="something" value="HTML5 button" id="btn btn-primary"/>
    </div>
</div>