css - Button gets extended when using flexbox to -


i trying put button @ center of div section using flex-box.

here code:

<div>      <a href="#" class="btn btn-outline-primary btn-lg" style="display: flex; justify-content: center;">button</a>  </div>

however, button extended after compiling.

how should modify codes avoid problem of extension?

    .btn{       padding:0 0;       margin:auto;       width:20px;     } 

this css fix issue


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -