ButtonStylesInspiration icon indicating copy to clipboard operation
ButtonStylesInspiration copied to clipboard

Float left in .button

Open caroso1222 opened this issue 10 years ago • 0 comments

Hi.

I'm having a hard time trying to center a button inside a bootstrap column. I have something like:

<div class ="col-sm-3">
   <button class = "button button--aylen">My text </button>
</div>

I found in the file button.css that the button is floated to the left. Why is this necessary? I removed it and now I can place the button wherever I want using its margin (e.g. margin:auto; to center on parent).

Should I send a PR editing the float property?

.button{
    float:none; /* CHANGED FROM LEFT TO NONE*/
    min-width: 150px;
    max-width: 250px;
    display: block;
    margin: 1em;
    padding: 1em 2em;
    border: none;
    background: none;
    color: inherit;
    vertical-align: middle;
    position: relative;
    z-index: 1;
    -webkit-backface-visibility: hidden;
    -moz-osx-font-smoothing: grayscale;
}

caroso1222 avatar Dec 31 '15 23:12 caroso1222