button vertical align bootstrap

user2568768

I'm trying to align a button in a simple form..

I did this:

<div class="panel panel-default">
          <div class="panel-heading">teste</div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6" style="padding-right:20px; border-right: 1px solid #ccc;">
                       <label class="form-control"> Teste</label>
                        <input type="button" class="form-control btn-danger" value="example" /><br/>
                         <input type="button" class="form-control btn-danger" value="example" /><br/>
                         <input type="button" class="form-control btn-danger" value="example" /><br/>
                         <input type="button" class="form-control btn-danger" value="example" /><br/>
                    </div>
                    <div class="col-lg-6"  style="margin:0 auto;"  >
                            <input type="button"   value="botão" />
                     </div>
                      </div>
            </div>
        </div>

enter image description here

but I want this button to be centered as shown in the following image:

enter image description here

how can i do that? i used "style="margin:0 auto;" on div but didn't work..

Itay

I've made you an example of a possible solution. It may need some extra work but it shows the general idea.

jsFiddle Demo

I've added a new class called vertical-container for this demo.

.vertical-container .row {
    display: table;
    width: 100%;
}
.vertical-container .row > .col-lg-6 {
    display: table-cell;
    vertical-align: middle;
    /* float: none;          ~~~~~ Use this setting if needed */
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related