1

I'm trying to align the text to the center inside the select element of a form. It works fine in Firefox but the text still align to left in Chrome: any ideas?

Here's the css:

.top-search select{
  background: #fff;
  border: 1px solid #ccc;
  width: 190px;
  height: 28px;
  text-align: center;
  padding-top: 4px;
}

Works fine in FF but not in Chrome

Nick Andriopoulos
  • 10,313
  • 6
  • 32
  • 56
Manuel Isern
  • 71
  • 1
  • 6

1 Answers1

0

I know that styling selects is something that is not very easy. There are some things you can change (height and border) but other attributes you cannot. It's more up to the browser to decide how it will be styled and how much you can change. So it would appear FF is allowing you to change it while Chrome is not. And I think it's entirely up to the browser (and OS) in this case.

Fernker
  • 2,238
  • 20
  • 31