2016-05-08 15 views
-3

iがコントロールから私の中でブートストラップを使用SAMPラインの要素が、同じラインでなく、私の入力とボタンがPHPエコーのhtml

<div class="form-group"> 
       <label class="col-lg-3 control-label" id="title-meaning">Meaning:</label> 
       <div class="col-lg-8" id="input-mean"> 

        <?php 
foreach ($words as $row) { 
    $word_tmp = $row['meaning']; 
} 
$meaningarray = explode("/", $word_tmp); 

for ($i = 0; $i < count($meaningarray); $i++) { 
    echo '<input class="form-control" value="' . htmlspecialchars($meaningarray[$i]) . '" type="text" name="meaning[]" id="meaning">'; 
    if ($i == 0) { 
     echo '<button class="add_field_button" id="btn-add"> 
             <span class="glyphicon glyphicon-plus" aria-hidden="true" id="glyphicon-plus"></span> 
             </button>'; 
    } 
    echo '<br>'; 
} 

?> 

       </div> 
      </div> 

午前には、左のCSSボタンfloatにしてみてくださいではなく、変更

どのようにすることができます私がやります ??

+0

PHPは、とは何の関係もありませんこの。レンダリングされたHTMLとCSSを投稿します。 – j08691

答えて

0

ラベルをしたいとインラインであることを形成するならば、以下のコードにあなたのhtmlを変更する(私は、フォームグループは、ブートストラップフォーム・グループクラスであると仮定している)

<div class="form-group form-inline"> 
    <label for="email">Email address:</label> 
    <input type="email" class="form-control" id="email"> 
    </div> 
+0

私はfromgroupをform-groupに変更しますform-inline同じ結果を返します – Danusorn

+0

出力をどのように見せたいのか、そしてブートストラップを正しく使用しているかの写真を表示できますか? –

関連する問題