skip to Main Content

I’m using Twitter Bootstrap 3, and I don’t have any additional CSS file.
I have the following code somewhere in my HTML page:

<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:

enter image description here

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> ?

Thanks 🙂

3

Answers


  1. Add this(change the px to your liking)

    <a ng-click="addTask()" class="glyphicon glyphicon-plus" style="margin-top:15px;"></a>
    
    Login or Signup to reply.
  2. You can also use vertical-align: middle;:

    <a ng-click="addTask()" class="glyphicon glyphicon-plus" 
       style="vertical-align: middle;"></a>
    
    Login or Signup to reply.
  3. Try this:

    <a ng-click="addTask()" class="glyphicon glyphicon-plus" style="display: inline-block; margin-top:15px;"></a>
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search