0

I have this my view

 @Html.DropDownListFor(model => model.StateCode, Model.StateList, "Select", new { @style = "text-align : center" })

All the state abbreviations in the Drop Down List are aligning left. What should do to align them center?

@Jason Evans I don't think it is browser specific because I used this in the same view and it is aligning center. @Html.TextBoxFor(model => model.City, new { @class = "", @style = "width:140px;text-align:center"})

TJK
  • 441
  • 4
  • 11
  • 27
  • Sorry, I meant the ability to centre the text of a `select` list could be browser specific. – Jason Evans Jul 22 '11 at 18:53
  • The thing is, you shouldn't be able to do this, because it breaks the usability of the ` – Greg Bair Jul 22 '11 at 18:56
  • @Jason Evans Sorry, I understood your comment in a different way. In FF it is working but not in IE. Is there a way that makes it work in IE too? – TJK Jul 22 '11 at 19:43
  • @greg - Very, very good point! I didn't think of that myself. Having space on the left side of the text in the – Jason Evans Jul 22 '11 at 20:12

1 Answers1

0

It looks like this functionality may be browser specific:

how to make sure select option text align in the center in IE?

Community
  • 1
  • 1
Jason Evans
  • 28,906
  • 14
  • 90
  • 154