Search results container alignment

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

 
Keymaster
5 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10427

    Participant

    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,
    Yaniv

    Attachments:
    You must be logged in to view attached files.
    #10430

    Hello!

    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 :)


    #10434

    Participant

    Hi 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

    #10436

    Yes, 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 :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.