开发者

Is there any way to force the dropdown (select) arrow control to be on the right?

开发者 https://www.devze.com 2023-03-17 16:20 出处:网络
I am using direction:rtl in a select element. It does exactly wh开发者_如何学Goat I need which is:

I am using direction:rtl in a select element. It does exactly wh开发者_如何学Goat I need which is:

  • expand the options to the left when dropdown is open
  • options text is right aligned

Question: Is there any way to force the arrow control to be on the right?

Reason why I need the select like this:

I need those because the dropdown is located on the right edge of a page and if I expand it to the right (as default), the options text won´t show up completely. The options text are very long.


I don't think there's good way to manipulate the control. If you want to customize, you should make your own.

Or, you can use something already made by someone like jQuery selectBox. You may can customize it.


I don't know if this is possible in your situation but if you can put direction:rtl on the whole page, the select will probably expand to the left, thus making your question a moot point.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号