'Why do the contents in a Bootstrap grid float left? Is there a way to get the contents in a Bootstrap grid to be in the center?

I have tried using text-align: center;, but this does not change the text inside of the Bootstrap grid. Is the float-left the default setting or is there a way I can change it? My code looks something like this:

    <div style="margin-top: 10px; margin-bottom: 20px; margin-right: 20%; margin-left: 20%; text-align: center; font-family: 'Share Tech Mono', monospace; background-color: white;   border-radius: 50px;">
        <h1 style="padding-top: 10px;">Code Example</h1>
        <br>
        <br>
        <div class="row">
            <div class="col-sm-4 "><a style="color: black;">Column 1</a></div>
            <div class="col-sm-4"><a style="color: black;">Column 2</a></div>
            <div class="col-sm-4"><a style="color: black;">Column 3</a></div>
        <div style="height: 50px;"></div>
            
        </div>
    </div>
    


Solution 1:[1]

CSS Copy-paste the stylesheet into your before all other stylesheets to load our CSS. '''''' if you are missing this link please add .I hope it will work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Somnath More