Reputation: 870
When the page direction is set to 'rtl; it creates horizontal scroll. I've used chosen plugin. it creates unwanted "left: -9999px;" for "chosen-drop" div class. please help me to solve this.
Upvotes: 6
Views: 3501
Reputation: 1
I have tried the following custom css and it is working for me
html{
direction:ltr;
}
Upvotes: 0
Reputation: 1
Change the left:-9000
to display:none
in chosen.css
and jquery.chosen.j
s. This is a known issue with Chosen.
It is working well for me.
https://github.com/harvesthq/chosen/issues/447
https://github.com/woothemes/woocommerce/issues/3386
Upvotes: 0
Reputation: 45485
Make sure that when your page is RTL, you also configure your chosen selects be RTL. As mentioned in https://harvesthq.github.io/chosen/ Try
<select class="chosen-select chosen-rtl">
If all your selects are rtl you can can add chosen-rtl
to them all before calling chosen
do like:
$('select:visible').addClass("chosen-rtl");
$('select:visible').chosen();
It is much better than tweaking the component css ;)
Upvotes: 4
Reputation: 249
.chosen-container .chosen-drop {
position: absolute;
top: 100%;
left: 9999px;
z-index: 1010;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
border-top: 0;
background: #d1d0d0;
}
Find and Change this with your "chosen.css" file. However "left: -9999px;" should be changed into "left: 9999px;"
Upvotes: 11