I have this code. My problem is none of the style is getting applied on the select menu. But its getting applied on the input box. Am i doing anything wrong here?
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 OUTPUT
<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>
Thanks
the correct selector is
select, not[type=select].That style of selector reserved for an
inputelement (e.g.input[type=email], input[type=text])