[英]Vertical centering <a> with glyphicon on Bootstrap 3
I'm using Twitter Bootstrap 3 , and I don't have any additional CSS file. 我正在使用Twitter Bootstrap 3 ,并且没有任何其他CSS文件。 I have the following code somewhere in my HTML page:
我的HTML页面中有以下代码:
<div class="col-md-12">
<div class="col-md-5">
<input type="text" class="form-control" placeholder="Task"/>
</div>
<div class="col-md-5">
<input type="textarea" class="form-control" placeholder="Descr."/>
</div>
<a ng-click="addTask()" class="glyphicon glyphicon-plus"></a>
</div>
It looks like this: 看起来像这样:
As you can see, the +
is not well centered. 如您所见,
+
居中。 I would like to vertical align it with my inputs. 我想垂直对齐我的输入。 I suppose it is something simple, but I have not yet found a good solution ...
我想这很简单,但是我还没有找到一个好的解决方案...
Can you help me finding how I can vertical center this <a>
? 您能帮我找到如何使
<a>
垂直居中吗?
Thanks :-) 谢谢 :-)
添加此内容(根据您的喜好更改px)
<a ng-click="addTask()" class="glyphicon glyphicon-plus" style="margin-top:15px;"></a>
You can also use vertical-align: middle;
您也可以使用
vertical-align: middle;
: :
<a ng-click="addTask()" class="glyphicon glyphicon-plus"
style="vertical-align: middle;"></a>
尝试这个:
<a ng-click="addTask()" class="glyphicon glyphicon-plus" style="display: inline-block; margin-top:15px;"></a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.