gpt4 book ai didi

css - Bootstrap 表 : input and button don't have the same height in TD

转载 作者:行者123 更新时间:2023-11-28 14:31:19 25 4
gpt4 key购买 nike

在表格 TD 中,我想显示一个输入和一个按钮。

我的问题是两个组件的高度似乎不一样,我该如何解决?

谢谢。

 <td  class="text-center col-md-1" data-title="'Compte'"  align="center" >
<div class="col-md-12">
<input value="999"
style="width: 70%; text-align: center;"
ng-disabled="true" class="col-md-10 form-control" />
<button type="button"
ng-click="vm.openListeCompteDialog(sortie)"
class="btn btn-info btn-sm">
<span class="glyphicon glyphicon-list"></span>
<span class="hidden-xs hidden-sm"></span>
</button>
</div>

</td>

enter image description here

最佳答案

从你的

中删除类 .btn-sm

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="row">
<td class="text-center col-md-1" data-title="'Compte'" align="center" >
<div class="col-md-12">
<input value="999"
style="width: 70%; text-align: center;"
ng-disabled="true" class="col-md-10 form-control" />
<button type="button"
ng-click="vm.openListeCompteDialog(sortie)"
class="btn btn-info">
<span class="glyphicon glyphicon-list"></span>
<span class="hidden-xs hidden-sm"></span>
</button>
</div>

</td>
</div>
</body>
</html>

关于css - Bootstrap 表 : input and button don't have the same height in TD,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54144348/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com