Skip to content

Float left in .button #1

@caroso1222

Description

@caroso1222

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions