Class 选择多个文本框

Class 选择多个文本框,class,textbox,height,width,selector,Class,Textbox,Height,Width,Selector,我想知道是否有办法改变两个文本框的高度和宽度。我试过: .class{width:200px;height:100px;} 但它没有效果。我是否可以在不必键入的情况下同时选择这两个选项: #firstname, #lastname{width:200px; height:100px;} 代码如下: <div class="info"> <input type="text" id="firstname" > </div> <div class="inf

我想知道是否有办法改变两个文本框的高度和宽度。我试过:

.class{width:200px;height:100px;}
但它没有效果。我是否可以在不必键入的情况下同时选择这两个选项:

#firstname, #lastname{width:200px; height:100px;}
代码如下:

<div class="info">
<input type="text" id="firstname" >
</div>
<div class="info">
<input type="text" id="lastname" >
</div>


谢谢

哦,哈哈。谢谢我还有一个简短的问题。什么时候使用div id vs div class?在我键入的代码中,类是否正确?它们有一个非常类似的函数,只有一个例外——ID只能在页面上使用一次,类可以使用任意次数。我倾向于只使用类,但你可以用ID做基本布局,然后用类做样式-所以,#header,#footer等,然后用.box、.column、。不过你更喜欢工作。嘿,如果你高兴的话,你能接受这个答案吗?:)点击大勾!
.info input {width:200px;height:100px}