Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search results container alignment
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 1 month ago.
- AuthorPosts
- October 11, 2016 at 8:26 am #10427
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,
YanivAttachments:
You must be logged in to view attached files.October 11, 2016 at 8:42 am #10430Hello!
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:
.asp_main_container { min-width: 250px; }
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:
div[id*=ajaxsearchprores1] { margin-left: -75px !important; }
I suggest using solution 1 or 2, those are the best and safest.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 11, 2016 at 9:00 am #10434Hi 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 #10436Yes, definitely will make adjustments and more tests on RTL environments 🙂
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.