Solution 1 :

I think you just had a couple of classes in your parent that were the issue. Removing them centered the buttons for you

<div class="mb-4 text-center ">

Hopefully this fixes this for you..



To center the anchors only I would wrap them in container and center its conents.

I’ve updated this fiddle to center ONLY the buttons. Hope it helps !

Problem :

I want these two <a> tags at the end to be centered, but declaring the class .text-center directly on the tag isn’t working.
How can I force then to be centered without using !important?

  <div class="col-md-6 mb-4 text-center text-md-left">
    <p class="display-4 font-weight-bold pt-4">
      Lorem ipsum.
    <hr class="hr-light">
    <a target="_blank" href="#" class="btn btn-indigo btn-lg text-center">Lorem ipsum</a>
    <a target="_blank" href="#" class="btn btn-success btn-lg text-center">Lorem ipsum</a>



Comment posted by Myck Ribeiro Otoni

Thanks for the suggestion, but this centers all the tags. Is there a way to keep the class text-md-left to all children tags, except for tag a