Center select text

0

How to center the text of a select? I removed the arrows down with the

-moz-appearance: none;
-webkit-appearance: none;

But the text is next to it and does not center. It looks like this:

--------------------------
|TEXTO DO SELECT         |
-------------------------- 

I would like it to look like this:

--------------------------
|    TEXTO DO SELECT     |
-------------------------- 

I tried it with text-align, margin, etc and it does not stay. Why?

EDIT

I tried with padding-left, of the answer of the guilherme, but changing the resolution, of the problem. Would you have another solution?

    
asked by anonymous 25.05.2017 / 13:37

1 answer

1

Without the help of external plugins, you can centralize only the text inside the box and not the dropdown by placing the following CSS in select :

text-align: center; /* para firefox */
text-align-last: center; /* para chrome */
    
25.05.2017 / 13:54