---
category: Input
created: '2019-11-16'
description: Create a stepper input with CSS flexbox
keywords: css flexbox, css stepper input
thumbnail: /assets/css-layout/thumbnails/stepper-input.png
title: Stepper input
---
## HTML
```html index.html
```
## CSS
```css styles.css
.stepper-input {
display: flex;
/* Border */
border: 1px solid #d1d5db;
border-radius: 0.25rem;
/* Size */
height: 2rem;
}
.stepper-input__button {
/* Reset */
background: #d1d5db;
border: none;
/* Center the content */
align-items: center;
display: flex;
justify-content: center;
/* Size */
width: 2rem;
}
.stepper-input__content {
flex: 1;
}
.stepper-input__input {
/* Reset */
border: none;
/* Take full size of its container */
height: 100%;
width: 100%;
}
```
```css styles.css hidden
body {
align-items: center;
display: flex;
justify-content: center;
}
.stepper-input {
display: flex;
/* Border */
border: 1px solid #d1d5db;
border-radius: 0.25rem;
/* Size */
height: 2rem;
width: 16rem;
}
.stepper-input__button {
/* Reset */
background: #d1d5db;
border: none;
/* Center the content */
align-items: center;
display: flex;
justify-content: center;
/* Size */
width: 2rem;
}
.stepper-input__content {
flex: 1;
}
.stepper-input__input {
/* Reset */
border: none;
/* Take full size of its container */
height: 100%;
width: 100%;
}
```
```html index.html hidden
```