From a35188cb008924d12086b712f29fb8c64bedee0d Mon Sep 17 00:00:00 2001 From: Andrius Stonys Date: Wed, 29 Oct 2014 15:45:03 +0200 Subject: [PATCH] Add padding to select2 container displayed above Added padding to ".select2-search" container instead of margin for ".select2-search input". This fixes bug of "#select2" movement when resizing page. Steps to reproduce the bug: - open select2 so it appears above the input - resize the window Actual results: - #select2-drop moves up by 4px Expected results: - #select2-drop stays in same place --- select2.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.css b/select2.css index f39cb21d..b99ff810 100644 --- a/select2.css +++ b/select2.css @@ -273,8 +273,8 @@ html[dir="rtl"] .select2-search input { background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; } -.select2-drop.select2-drop-above .select2-search input { - margin-top: 4px; +.select2-drop.select2-drop-above .select2-search { + padding-top: 4px; } .select2-search input.select2-active {