Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to center text on button w/ a wrapper div

I am using a wrapper to align the text on the button but it is still not working. Any ideas on what do do?

.text-center{
    text-align: center;
}

.pass-btn{
    background: linear-gradient(90deg, #03DABB 0%, #03DA9A 100%);
    border-radius: 3px;
    width: 187px;
    height: 33px;
    border: none;
    text-transform: uppercase;
    margin: 10px auto;
    padding: 10px;
    display: flex;
}
<div class="text-center">
    <button class="pass-btn">get pass</button>
</div>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

If I’m understanding you correctly

align-items: center;
justify-content: center;

on the button

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading