简体   繁体   中英

Align button to bottom of div

I need to align a button to the bottom of my div:

<div class="row">

<div class="col-sm-6 col-md-3" >
   <div class="caption" style="background-color:white;border-radius: 5px 5px 5px 5px;min-height:420px;">
        <div class="thumbnail" >
            <img src="https://placehold.it/420x200" alt="Generic placeholder thumbnail">
        </div>

        <h3 class="dark-text">Title</h3>
        <p class="dark-text-description">Description</p>


            <a href="#" class="btn btn-primary full-width buttom-bottom" role="button" style="">
                View
            </a> 


    </div>
</div>

Here is what it looks like at the moment: http://pasteboard.co/bpTSsTC01.png

Use margin-top property according to your requirement.

example: margin-top:100%;

Alternatively, you can use position property

example: position:absolute; bottom:0; position:absolute; bottom:0;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM