html - Have Text in an Input Box Start X Pixels Over -


so, have input box , hugs left side lot because of chosen font , because of size customization , such. however, when type in text, looks pretty icky because of this. want have there kind of thing can change change how far on text in text box starts (besides left, center, , right).

see code below. notice when type in text box, hugs left side bit , looks bad.

.signatureinformationsign {    color: #266ac3;    font-family: 'titillium web', sans-serif;    font-weight: 400;    font-size: 50px;  }  .editortextinfo {    color: #016f47;    font-family: 'source sans pro', sans-serif;    font-weight: 400;    font-size: 50px;    margin-top: 35px;  }  .editortextbox {    font-family: 'hind', sans-serif;    margin-top: 80px;    font-size: 30px;    height: 48px;    width: 260px;    border: 3px solid darkgray;    border-radius: 18px;  }  .editortextbox:focus {    outline: 0;  }  input[type = "radio"]:after {    width: 25px;    height: 25px;    border-radius: 50%;    top: -12px;    right: 6px;    margin-right: 50px;    background-color: darkgray;    content: "";    position: relative;    display: inline-block;  }  input[type = "radio"]:hover {    cursor: pointer;  }  input[type = "radio"]:checked:after {    width: 25px;    height: 25px;    border-radius: 50%;    background-color: orange;    top: -12px;    right: 6px;    content: "";    position: relative;    display: inline-block;  }  .editorphonebox {    font-family: 'hind', sans-serif;    margin-bottom: 20px;    font-size: 16px;    height: 22px;    width: 28px;    border: 2px solid darkgray;    border-radius: 6px;  }  .editorphoneboxother {    font-family: 'hind', sans-serif;    margin-bottom: 20px;    font-size: 16px;    height: 22px;    width: 38px;    border: 2px solid darkgray;    border-radius: 6px;  }  .editorphonebox:focus, .editorphoneboxother:focus {    outline: 0;  }  #plusbutton {    color: gray;    font-family: 'source sans pro', sans-serif;    font-size: 32px;    margin-top: -15px;  }  #plusbutton:hover {    cursor: pointer;  }
<!doctype html>  <html>    <head>      <meta charset="utf-8">      <meta name="viewport" content="width=device-width">      <title>repl.it</title>      <link href="index.css" rel="stylesheet" type="text/css">      <link href="https://fonts.googleapis.com/css?family=hind|source+sans+pro|titillium+web" rel="stylesheet">    </head>    <body>      <div id = "question1">        <center><div class = "signatureinformationsign">signature information sign</div></center>        <center><div class = "editortextinfo">name</div></center>        <center><input type = "text" class = "editortextbox"></center>      </div>    </body>  </html>

p.s don't care opinion whether or not looks good, want solution.

you add padding. added left & right of input box of 20px;

.signatureinformationsign {    color: #266ac3;    font-family: 'titillium web', sans-serif;    font-weight: 400;    font-size: 50px;  }  .editortextinfo {    color: #016f47;    font-family: 'source sans pro', sans-serif;    font-weight: 400;    font-size: 50px;    margin-top: 35px;  }  .editortextbox {    font-family: 'hind', sans-serif;    margin-top: 80px;    font-size: 30px;    height: 48px;    width: 260px;    border: 3px solid darkgray;    border-radius: 18px;    padding-left: 20px;    padding-right: 20px;  }  .editortextbox:focus {    outline: 0;  }  input[type = "radio"]:after {    width: 25px;    height: 25px;    border-radius: 50%;    top: -12px;    right: 6px;    margin-right: 50px;    background-color: darkgray;    content: "";    position: relative;    display: inline-block;  }  input[type = "radio"]:hover {    cursor: pointer;  }  input[type = "radio"]:checked:after {    width: 25px;    height: 25px;    border-radius: 50%;    background-color: orange;    top: -12px;    right: 6px;    content: "";    position: relative;    display: inline-block;  }  .editorphonebox {    font-family: 'hind', sans-serif;    margin-bottom: 20px;    font-size: 16px;    height: 22px;    width: 28px;    border: 2px solid darkgray;    border-radius: 6px;  }  .editorphoneboxother {    font-family: 'hind', sans-serif;    margin-bottom: 20px;    font-size: 16px;    height: 22px;    width: 38px;    border: 2px solid darkgray;    border-radius: 6px;  }  .editorphonebox:focus, .editorphoneboxother:focus {    outline: 0;  }  #plusbutton {    color: gray;    font-family: 'source sans pro', sans-serif;    font-size: 32px;    margin-top: -15px;  }  #plusbutton:hover {    cursor: pointer;  }
<!doctype html>  <html>    <head>      <meta charset="utf-8">      <meta name="viewport" content="width=device-width">      <title>repl.it</title>      <link href="index.css" rel="stylesheet" type="text/css">      <link href="https://fonts.googleapis.com/css?family=hind|source+sans+pro|titillium+web" rel="stylesheet">    </head>    <body>      <div id = "question1">        <center><div class = "signatureinformationsign">signature information sign</div></center>        <center><div class = "editortextinfo">name</div></center>        <center><input type = "text" class = "editortextbox"></center>      </div>    </body>  </html>


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -