Skip to content

Instantly share code, notes, and snippets.

@pmdartus
Forked from anonymous/index.html
Created June 12, 2016 07:19
Show Gist options
  • Save pmdartus/39bd3d4543a3864185bb324703379081 to your computer and use it in GitHub Desktop.
Save pmdartus/39bd3d4543a3864185bb324703379081 to your computer and use it in GitHub Desktop.
Inner Button Step counter using flexbox // source https://jsbin.com/gorelu
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Step counter using flexbox">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Inner Button</title>
<style id="jsbin-css">
.stepper-input {
display: flex;
}
.stepper-input__input {
width: 60px;
text-align: center;
border-left: 0;
border-right: 0;
}
.button {
cursor: pointer;
padding: 5px 15px;
color: #FFFFFF;
background-color: #4EBBE4;
font-size: 12px;
border: 1px solid #16A2D7;
border-radius: 5px;
}
.button--addRight {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.button--addLeft {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
</style>
</head>
<body>
<div class="stepper-input">
<button class="button button--addLeft">-</button>
<input class="stepper-input__input" type="text" value="24" placeholder="Age"/>
<button class="button button--addRight">+</button>
</div>
<script id="jsbin-source-css" type="text/css">.stepper-input {
display: flex;
}
.stepper-input__input {
width: 60px;
text-align: center;
border-left: 0;
border-right: 0;
}
.button {
cursor: pointer;
padding: 5px 15px;
color: #FFFFFF;
background-color: #4EBBE4;
font-size: 12px;
border: 1px solid #16A2D7;
border-radius: 5px;
}
.button--addRight {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.button--addLeft {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}</script>
</body>
</html>
.stepper-input {
display: flex;
}
.stepper-input__input {
width: 60px;
text-align: center;
border-left: 0;
border-right: 0;
}
.button {
cursor: pointer;
padding: 5px 15px;
color: #FFFFFF;
background-color: #4EBBE4;
font-size: 12px;
border: 1px solid #16A2D7;
border-radius: 5px;
}
.button--addRight {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.button--addLeft {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment