Everything is centered. It is necessary that the "Email" and "Password" are from the beginning of the text field. Help me please.

Everything is centered. It is necessary that the "Email" and "Password" are from the beginning of the text field. Help me please.

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
For these "Email" and "Password" it can be <label> or <span> or just <div> (exactly to them) to ask:
text-align: left; For example:
form { text-align: center; } input { display: block; text-align: center; } label { display: block; text-align: left; } /* доп. стили */ *{ box-sizing: border-box; } form { max-width: 300px; width: 100%; background: #66bcf7; border-top: 5px solid #2aa4f7; padding: 2rem 3rem; } input { width: 100%; height: 3rem; line-height: 3rem; border: 3px solid #fff; background: transparent; color: #fff; padding: 0 1rem; margin-bottom: 2rem; } label { margin-bottom: 10px; color: #fff; } <form> <div class="row-form"> <label>Электронная почта</label> <input type="text" name="text" id="text" value="email@com.ru"> </div> <div class="row-form"> <label>Пароль</label> <input type="text" name="text" id="passs" value="****"> </div> </form> From the beginning of the input form (if I correctly understand what you want at all):
form { text-align: center; } input { display: inline-block; vertical-align: middle; width: 49%; text-align: center; } label { display: inline-block; vertical-align: middle; width: 49%; text-align: left; } /* доп. стили */ *{ box-sizing: border-box; } form { max-width: 500px; width: 100%; background: #66bcf7; border-top: 5px solid #2aa4f7; padding: 2rem 3rem; } input { height: 3rem; line-height: 3rem; border: 3px solid #fff; background: transparent; color: #fff; padding: 0 1rem; } label { color: #fff; line-height: 3rem; } .row-form { margin-bottom: 2rem; } <form> <div class="row-form"> <label>Электронная почта</label> <input type="text" name="text" id="text" value="email@com.ru"> </div> <div class="row-form"> <label>Пароль</label> <input type="text" name="text" id="passs" value="****"> </div> </form> span and label then you still need to set display: block . - YuSSource: https://ru.stackoverflow.com/questions/578357/
All Articles