This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Results box height uncontrolled

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #16421
    arnonzamirarnonzamir
    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 MarcinkoErnest 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:

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

    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.

    #16426
    arnonzamirarnonzamir
    Participant

    Like magic. Thanks!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.