0

I'm using this example to style drop down menu using CSS jsfiddle.

HTML:

<div class="styled-select blue">
  <select name="brand" id="brand">
    <option>Choose category first</option>
    <option>Brand one</option>
    <option>Brand two</option>
  </select>
</div>

CSS:

.styled-select {
    background: #fff url('http://www.myiconfinder.com/uploads/iconsets/20-20-1383000fade3dbdf3e93972212606011-Arrow.png') no-repeat 10px center;
    height: 31px;
    text-align: center;
    overflow: hidden;
    width: 80%;
    margin-bottom: 15px;
}
.styled-select select {
    background: transparent;
    border: none;
    font-size: 14px;
    height: 31px;
    width: 103%;
    float: left;
    text-align: center;
    /*padding-left:48%*/
}

But the text is aligned left not centered. There's a way to set padding left to the select tag itself but does not center text correctly so how to fix this?

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
jq beginner
  • 1,010
  • 3
  • 21
  • 41

0 Answers0