我有这个代码。我的问题是选择菜单上没有应用任何样式。但它被应用于输入框。我在这里做错什么了吗?
HTML
<div class="signup">
<div class="personal">
<?php
echo $this->Form->create('User',array('/users/signup'));
echo $this->Form->input('name');
$options = array('m'=>'Male','f'=>'Female');
echo $this->Form->input('gender', array( 'options'=>$options,'type'=>'select', 'label'=>'Gender'));
echo $this->Form->submit('Sign up');
echo $this->Form->end();
?>
</div>
</div>
CSS
.signup{
/* class style */
}
.signup .personal form input[type=text],[type=select]{
border: 1px solid #cacaca;
border-radius: 2px;
font: 12px arial;
height: 20px;
width: 150px;
}
HTML 输出
<div class="signup">
<div class="personal">
<form action="/appraisal/users/signup" /users/signup="/users/signup" id="UserSignupForm" method="post" accept-charset="utf-8">
<div style="display:none;">
<input type="hidden" name="_method" value="POST"/>
</div>
<div class="input text">
<label for="UserName">Name</label>
<input name="data[User][name]" type="text" id="UserName"/>
</div>
<div class="input select">
<label for="UserGender">Gender</label>
<select name="data[User][gender]" id="UserGender">
<option value="m">Male</option>
<option value="f">Female</option>
</select>
</div>
<div class="submit">
<input type="submit" value="Sign up"/>
</div>
</form>
</div>
</div>
谢谢