Results box height uncontrolled

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Results box height uncontrolled

This topic contains 2 replies, has 2 voices, and was last updated by arnonzamir arnonzamir 6 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #16421
    arnonzamir
    arnonzamir
    Participant

    when running a search with a large number of items in results box, (you can try to search for “legal” for example), the results box goes beyond the bottom of the screen so some results and the “more” link are never within clicking ability.

    I tried 20 variations with CSS and JS, to make the height automatically fix itself.

    #16424
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    It’s because the search is placed into a fixed header element, and once the scrolling finishes on the visible parts of the results box, it continues on the document body, but since the search is fixed with the header, it will never scroll to the bottom of it.

    I believe the best solution would be this custom CSS:

    @media screen and (max-height: 768px) {
        .asp_r .results {
            max-height: 60vh !important;
        }
    }

    It will limit the result box maximum height on screen heights smaller than 768 pixels to the 60% of the viewport height, thus it will always resize to fit in.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #16426
    arnonzamir
    arnonzamir
    Participant

    Like magic. Thanks!!

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

You must be logged in to reply to this topic.