I have a drop down list which I styled but I still can’t get why does the text always align differently in chrome and in firefox. I tried adding text-align:center; on my css and the firefox make the selection list centered but is not centered vertically while in chrome it doesn’t centered it all but at least it’s verticall alignment is centered. Here’s the output of it currently (text-align center part removed):
Firefox rendering:

Chrome rendering:

this is my css code so far:
div container for the dropdown:
.container {
background-color:#424141;
border:1px solid #424141;
width:280px;
height:40px;
font-size:13pt;
font-weight:bold;
padding-right: -20px;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
and for the drop down:
.dropdown {
background-color:#424141;
border:1px solid #424141;
position:absolute;
color: #000000;
width:280px;
height:40px;
font-size:13pt;
font-weight:bold;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
and here’s the result after adding text-align:center; on the dropdown class:

in chrome it remains the same as above.
Here’s the html code for this. well it’s inside a table I think I can just skip the other part:
<tr>
<td><p class="titles">City</p></td>
<td><div class="container"><select name="city" tabindex="16" class="dropdown">
<?php foreach ($cities as $city1): ?>
<option <?php echo "value='".$city1['city']."'"; if($city1['city']==$city){echo "selected='selected'";} ?>>
<?php echo $city1['city']; ?>
</option>
<?php endforeach ?>
</select></div></td>
</tr>
What you are trying to do cannot be done cross-browser using HTML/CSS because the HTML/CSS specification doesn’t actually SAY how CSS or styling is supposed to be applied to form elements. Actualy you can write your own dropdown with javascript:
html:
js:
css:
css is copy paste but i hope you understand what i meen