Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add padding to a select widget

How do I add padding at the top of select options text?

For example:

example

Code :

select {
    background-image:url(../images/select.png);
    width:287px;
    height:35px;
    text-align: center;
    border:0;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    padding-left:10px;
    padding-right:2px;
    font-size:14px;
    font-family: Arial, Helvetica, sans-serif;
    color:#999999;
}
like image 589
Ajay Avatar asked Dec 01 '25 17:12

Ajay


1 Answers

I would go for line-height:35px;. With padding you get the famous box problem.

like image 141
Roland van Helven Avatar answered Dec 03 '25 12:12

Roland van Helven



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!