0

When I search any thing in input Search and zoom out (ctrl/-) on my website , place of result of search will be change ! How I should fix it that result of search open bottom of input search exactly ? My url : link of my website and it's pic of result of search : pic of my website

  • Welcome to StackOverflow. It's a good idea to post your CSS and JavaScript in order for us to help you and to see what attempts were made. – Halaster Jan 03 '17 at 16:40

1 Answers1

0

Looking at your website it seems that you have a script which generates the results using absolute positioning after results are loaded. Upon zooming out the absolute positioning is no longer relevant.

If it were possible, a solution would have been to listen for the browser's zoom event and recalculate this, however there is currently no way to do that. More information about that in this SO question: Catch browser's "zoom" event in JavaScript

The ideal solution would be to change the structure of your dropdown to not need absolute positioning if you want to handle this scenario.

Alternatively, you can keep searching for ways to listen to the zoom event and update the positioning of your dropdown using the search input's left offset.

Community
  • 1
  • 1
Halaster
  • 1,442
  • 1
  • 17
  • 27