I have input fields that should be displayed in the center, and then the texts on these input fields should be left aligned and "start" with the input fields.
http://jsfiddle.net/tfbatp5v/2/
.inputdes {
color: #9b9b9a;
font-size:20px;
height: 200px;
}
.blue {
height: 70px;
}
<div align="center" id="parent">
<div class="welcome">Welcome</div>
<div class="inputdes">
<div class="blue">text1<br><input id="inputfield1" /></div>
<div class="blue">text2<br><input id="inputfield2" /></div>
<div class="blue">text3<br><input id="inputfield3" /></div>
</div>
</div>
Run codeHide resultHowever, no matter what I do, every time I use it text-align: left;, it also automatically aligns the input fields. I tried to group text areas together with class names, but this will not work. Does anyone know the answer?
Thank!
source
share