Answers for "how to center input css"

CSS
1

center an input css

input {  
  display: block;
  margin-right: auto;
  margin-left: auto;
}
Posted by: Guest on April-10-2022
2

how to center a text input in css

input {
text-align: center;
}
Posted by: Guest on July-25-2021
0

Center input element css

<html>
<head>
    <style>
        div.wrapper {
            width: 300px;
            height:300px;
            border:1px solid black;
        }

        input[type="range"] {
             display: block;
             margin : 0 auto;
        }

    </style>
</head>
<body>

    <div class='wrapper'>
        <input type='range' name='1-10' value='5' min='1' max='2' />
    </div>    


</body>
</html>
Posted by: Guest on May-21-2022

Browse Popular Code Answers by Language