body { display:flex; flex-flow:column wrap; justify-content:center; align-items:center; } #c { margin-top:20px; } input[type=range]::before { content:attr(min); color:#000; padding-right:5px; } input[type=range]::after { content:attr(max); color:#000; padding-left:5px; }