2017-02-04 13 views
-1

どのようにこのボタンを1行に入れることができますか?これは私がBTNのBTN-主なタグによって推測しているブートストラップを使用している場合1つの行に2つのボタン

<form method="post"> 
    <button type="submit" name="render_button" class='btn btn-block btn-primary' style="width:100px;height:30px;" > Render </button> 

    <button type="submit" name="check" class='btn btn-block btn-primary' style="width:100px;height:30px;" > Render2 </button> 
</form> 
+2

として表示されるはず、btn-blockクラスは、あなたの犯人だと思う、彼らは同じ行に両方です。 –

+0

これはブートストラップにありますか? –

+0

^bootstrapに '.form-inline'がありますか? – Chay22

答えて

1

、ちょうど表示を追加:インラインブロック;各スタイルタグ

注: 2番目のボタンの余白部分を0にする必要があるかもしれません。

<form method="post"> 
     <button type="submit" name="render_button" class='btn btn-block btn-primary' style="width:100px;height:30px;display:inline-block;" > Render </button> 

     <button type="submit" name="check" class='btn btn-block btn-primary' style="width:100px;height:30px;display:inline-block;margin-top:0;" > Render2 </button> 
</form> 
1

私はあなたがそれを削除した場合、ボタンは、あなたが与えているコードからのインライン要素

<form method="post"> 
    <button type="submit" name="render_button" class='btn btn-primary' style="width:100px;height:30px;" > Render </button> 

    <button type="submit" name="check" class='btn btn-primary' style="width:100px;height:30px;" > Render2 </button> 
</form> 
関連する問題