diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index b6f464bfd29737f85510f4ee0434ad86dda3cdfe..ed83c2be9dfce55a1539e6b812c57e1fc01b5133 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1708,11 +1708,13 @@
 			if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) {
 				this.$el.find('#filestable thead th').addClass('hidden');
 				this.$el.find('#emptycontent').addClass('hidden');
+				$('#searchresults').addClass('filter-empty');
 				if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) {
 					this.$el.find('.nofilterresults').removeClass('hidden').
 						find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter},  null, {'escape': false}));
 				}
 			} else {
+				$('#searchresults').removeClass('filter-empty');
 				this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty);
 				if (!this.$el.find('.mask').exists()) {
 					this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty);
diff --git a/core/search/css/results.css b/core/search/css/results.css
index 36a2ccc13c304e76837be0078a238fe8819c0ef0..fd07561d13395353e6d91d4004e869827fdb35d8 100644
--- a/core/search/css/results.css
+++ b/core/search/css/results.css
@@ -12,6 +12,10 @@
 	/* account for margin-bottom in files list */
 	margin-top: -250px;
 }
+#searchresults.filter-empty {
+	/* remove whitespace on bottom when no search results, to fix layout */
+	margin-top: 0 !important;
+}
 
 #searchresults.hidden {
 	display: none;