Title: Bug in styling cakephp form select box
Tags: php;css;cakephp;css-selectors
Question: 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?
<div class="signup"&gt;
<div class="personal"&gt;
<?php
echo $this-&gt;Form-&gt;create('User',array('/users/signup'));
echo $this-&gt;Form-&gt;input('name');
$options = array('m'=&gt;'Male','f'=&gt;'Female');
echo $this-&gt;Form-&gt;input('gender', array( 'options'=&gt;$options,'type'=&gt;'select', 'label'=&gt;'Gender'));
echo $this-&gt;Form-&gt;submit('Sign up');
echo $this-&gt;Form-&gt;end();
</div&gt;
</div&gt;
.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"&gt;
<div class="personal"&gt;
<form action="/appraisal/users/signup" /users/signup="/users/signup" id="UserSignupForm" method="post" accept-charset="utf-8"&gt;
<div style="display:none;"&gt;
<input type="hidden" name="_method" value="POST"/&gt;
</div&gt;
<div class="input text"&gt;
<label for="UserName"&gt;Name</label&gt;
<input name="data[User][name]" type="text" id="UserName"/&gt;
</div&gt;
<div class="input select"&gt;
<label for="UserGender"&gt;Gender</label&gt;
<select name="data[User][gender]" id="UserGender"&gt;
<option value="m"&gt;Male</option&gt;
<option value="f"&gt;Female</option&gt;
</select&gt;
</div&gt;
<div class="submit"&gt;
<input  type="submit" value="Sign up"/&gt;
</div&gt;
</form&gt;
</div&gt;
</div&gt;
Thanks

Here is the accepted answer: the correct selector is select, not [type=select].
That style of selector reserved for an input element (e.g. input[type=email], input[type=text])
Comment for this answer: Also `.signup .personal form input[type=text],[type=select]` is overkill and can slow pages down in extreme cases. `.signup [input[type=text]` would suffice.

Here is another answer: This post might help you to get a css for Dropdown list. As Ross said, select is used as a selector to give some UI enhancements to select box.
This tutorial must help you to understand the css selectors available for Form Elements.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2012:00:07/26/12', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<php><css><cakephp><css-selectors>', 'Title': 'Bug in styling cakephp form select box', 'ViewCount': 1051, 'id': 11672724, 'user_AboutMe': '', 'user_AccountId': 947803.0, 'user_DisplayName': 'Ivin', 'user_Reputation': 4005.0, 'user_Views': 247.0, 'user_id': 974680.0}}