简体   繁体   English

如何更改整个分区中的文本框大小?

[英]How can I change the text boxes size in an entire division?

I am trying to make the boxes smaller and next to each other to be in a form "box-box-box" for the entire division but, I am not sure how to approach it.我正在尝试使盒子更小并且彼此相邻以形成整个部门的“盒子-盒子-盒子”形式,但是我不知道如何处理它。 I have an idea of how to do it by coding each text individually but, I was wondering if there is a faster way.我知道如何通过单独编码每个文本来做到这一点,但是我想知道是否有更快的方法。 Any help would be appreciated.任何帮助,将不胜感激。

 <div class="name"> <label class="yyyy"></label> <input type="text" class="year" id="Project Name" placeholder="YYYY"> _ <label class="sitee"></label> <input type="text" class="site" placeholder="Site" id="Project Name"> _ <label class="GG"></label><input type="text" class="gg" id="Project Name" placeholder="GG"> _ <label class="projectn"></label><input type="text" class="pn" id="Project Name" placeholder="Project Name"> _ <label class="amountt"></label> <input type="text" class="amount" id="Project Name" placeholder="Amount"> _ <label class=money></label> <input type="text" class="CCC" id="Project Name" placeholder="CCC"> </div>

Just give them a width只要给他们一个宽度

Also wrap the labels around the input and remove whitespace, then we can use ::before to add the underscore on all but the last还要将标签包装在输入周围并删除空格,然后我们可以使用::before在除最后一个之外的所有内容上添加下划线

 .name input { width:45px }.name label+label::before { content: "_" }
 <div class="name"> <label class="yyyy"><input type="text" class="year" id="Project Name" placeholder="YYYY"></label><label class="sitee"><input type="text" class="site" placeholder="Site" id="Project Name"></label><label class="GG"><input type="text" class="gg" id="Project Name" placeholder="GG"></label><label class="projectn"><input type="text" class="pn" id="Project Name" placeholder="Project Name"></label><label class="amountt"><input type="text" class="amount" id="Project Name" placeholder="Amount"></label><label class=money><input type="text" class="CCC" id="Project Name" placeholder="CCC"></label> </div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM