[英]php echo html element in samp line
i use bootstrap in my from control but my input and button not in same line我在 from control 中使用 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>
am try to css button float left ,but not change我尝试让 css 按钮向左浮动,但不会改变
how can i do ??我能怎么做 ??
if you want the label and form to be inline then change your html to the below code ( I have assumed that form-group is the bootstrap form-group class )如果您希望标签和表单内联,则将您的 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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.