如何使下拉选择框中的文本在所有浏览器中居中对齐?在Firefox中它是居中对齐的,但在Chrome和Safari中它会靠左对齐。
CSS:
.challenge{
max-width: 850px;
width: 98%;
height: 50px;
background: #ffffff;
margin: 30px auto;
}
.challenge select {
width: 100%;
height: auto;
background: url(images/select_arrow.png) no-repeat right top #ffffff;
font-family: 'RexBold';
text-align: center!important;
text-align: -moz-center;
text-align: -webkit-center;
font-size: 30px;
padding-top: 7px;
color: #545454;
overflow: hidden;
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
text-indent: 0.01px;
text-overflow: '';
}