我在我的控制中使用bootstrap,但我的输入和按钮不在同一行
<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按钮,但不要改变
我该怎么办?
答案 0 :(得分:0)
如果你想让标签和表格内联,那么将你的html更改为下面的代码(我假设form-group是bootstrap form-group类)
<div class="form-group form-inline">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email">
</div>