Skip to content

Instantly share code, notes, and snippets.

@delusioninabox
Last active July 23, 2018 21:05
Show Gist options
  • Save delusioninabox/9b8bfa02f6f2ed734700691968b101ab to your computer and use it in GitHub Desktop.
Save delusioninabox/9b8bfa02f6f2ed734700691968b101ab to your computer and use it in GitHub Desktop.
Flex box buttons example
<div class="flex">
<div class="button">One button</div>
<div class="button">This one is super long and stuff.</div>
<div class="button">Three</div>
<div class="button">4</div>
<div class="button">THis one is ok.</div>
</div>
.flex {
display: flex;
flex-wrap: nowrap;
margin: 1rem auto;
width: 100%;
max-width: 800px;
}
.flex .button {
font-family: sans-serif;
appearance: none;
flex-grow: 1;
background: #333;
color: #FFF;
padding: 0.5rem;
border-radius: 5px;
text-align: center;
max-width: 100px;
margin: 1rem auto;
display: flex;
justify-content: center;
flex-direction: column;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment