0

how can I make those two buttons stick to the edge of the div using bootstrap grid?

If someone can also explain a bit too please, I am trying to understand bootstrap grid...

here is what I managed to do so far https://ibb.co/iLDZSv - link to image

Code of what I did so far:

    <div class="row">
        <div class="col-xs-6 col-sm-6">
            <a href="#myTickets" data-toggle="tab" class="btn btn-default"><i
                class="fa fa-arrow-left"></i> Go Back</a>
        </div>

        <div class="col-xs-6 col-sm-3">

            <p></p>

        </div>

        <div class="col-xs-6 col-sm-3">
            <a class="btn btn-danger"><i class="fa fa-lock"></i> Close Ticket</a>
        </div>
    </div>
James
  • 337
  • 4
  • 12

1 Answers1

0

The default positioning of elements is to the left. You can use the pull-right helper in Bootstrap to float the object to the right hand side of the div.

<div class="col-xs-6 col-sm-3">
    <a class="btn btn-danger pull-right"><i class="fa fa-lock"></i> Close Ticket</a>
</div>
Erbilacx
  • 209
  • 2
  • 9
  • Thank you, I can accept this in 8 minutes, but this solved my issue :D I knew that it had to do with positioning and I was trying to solve it using css, didn't know about pull- – Crackengous Jul 10 '17 at 15:16
  • It is a good idea to have a read of both the helper classes and responsive utilities sections on the Bootstrap website. There's a few things that will save you a heap of time when building layouts - http://getbootstrap.com/css/#helper-classes – Erbilacx Jul 10 '17 at 15:18