- This topic has 3 replies, 2 voices, and was last updated 7 years, 11 months ago by Ernest Marcinko.
-
AuthorPosts
-
October 11, 2016 at 8:26 am #10427yaniv691Participant
Hi,
I use your great plugin on an RTL website.
How can I set the alignment of the search results so the results container is aligned to the right side of the search box, instead of the left?
It would be great to have an option to set this, for both desktop and mobile.
This is the website: https://growshop.co.il
Search for the string דשן
Thanks,
YanivOctober 11, 2016 at 8:42 am #10430Ernest MarcinkoKeymasterHello!
Well, that is automatically calculated and fit via Javascript, so unfortunately there is no configuration for that yet, it’s automatically aligned to the left side.
However it only happens if the search box size is below 250 pixels, because the results width always follows the box width, but it has a minimal width of 250 pixels. Here are a few possible temporary solutions:
1. solution: adding a min-width to the search box so it never reaches below 250 pixels, therefore the results will align to the box full width, with this custom CSS:
[html].asp_main_container {
min-width: 250px;
}[/html]2. Solution: Setting a fixed width for the search box (at least 250px) on the Theme Options -> Overall box layout panel: https://i.imgur.com/lcvXghe.png
3. Solution (this might not work): Adding a margin to the results list to “compensate” the alignment to the right:
[html]div[id*=ajaxsearchprores1] {
margin-left: -75px !important;
}[/html]I suggest using solution 1 or 2, those are the best and safest.
October 11, 2016 at 9:00 am #10434yaniv691ParticipantHi Ernest,
Thank you very much for the quick response.
Your fix did the trick! Maybe in the future you can make the plugin more RTL-friendly?
Yaniv
October 11, 2016 at 9:01 am #10436Ernest MarcinkoKeymasterYes, definitely will make adjustments and more tests on RTL environments 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.