D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
pmdartus
Full window
Github gist
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>