diff --git a/apps/files/js/app.js b/apps/files/js/app.js
index c2cef563fa0867ead8066ab36e0c61dd71bc6a68..3630ed7587d50afdccd2f7d0770c4f7a4be185ef 100644
--- a/apps/files/js/app.js
+++ b/apps/files/js/app.js
@@ -83,7 +83,6 @@
 			// TODO: ideally these should be in a separate class / app (the embedded "all files" app)
 			this.fileList = new OCA.Files.FileList(
 				$('#app-content-files'), {
-					scrollContainer: $('#app-content'),
 					dragOptions: dragOptions,
 					folderDropOptions: folderDropOptions,
 					fileActions: fileActions,
diff --git a/apps/files/js/favoritesplugin.js b/apps/files/js/favoritesplugin.js
index 454a505c7bd68e60c79b708fed9190325c6e3d68..7294ef9461cd88ceb316c2fed1ae98d4a8ff4b36 100644
--- a/apps/files/js/favoritesplugin.js
+++ b/apps/files/js/favoritesplugin.js
@@ -67,7 +67,6 @@
 			return new OCA.Files.FavoritesFileList(
 				$el, {
 					fileActions: fileActions,
-					scrollContainer: $('#app-content')
 				}
 			);
 		},
diff --git a/apps/files/js/recentplugin.js b/apps/files/js/recentplugin.js
index fcd427b18a2c278254ec287b65ff868fc91bba83..524b556a517e895bc2585d21da748436fc96b393 100644
--- a/apps/files/js/recentplugin.js
+++ b/apps/files/js/recentplugin.js
@@ -67,7 +67,6 @@
 			return new OCA.Files.RecentFileList(
 				$el, {
 					fileActions: fileActions,
-					scrollContainer: $('#app-content')
 				}
 			);
 		},
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php
index 674d4a9542eae1e0bdd411c27347b30377639c54..7dc994098007936e9943ee58bc20ec98e40e34af 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -203,6 +203,49 @@ class ViewControllerTest extends TestCase {
 				'type' => 'link',
 				'classes' => 'pinned',
 			],
+			'shareoverview' => [
+				'id' => 'shareoverview',
+				'appname' => 'files_sharing',
+				'script' => 'list.php',
+				'order' => 18,
+				'name' => \OC::$server->getL10N('files_sharing')->t('Shares'),
+				'classes' => 'collapsible',
+				'sublist' => [
+					[
+					'id' => 'sharingout',
+						'appname' => 'files_sharing',
+						'script' => 'list.php',
+						'order' => 16,
+						'name' => \OC::$server->getL10N('files_sharing')->t('Shared with others'),
+					],
+					[
+					'id' => 'sharingin',
+						'appname' => 'files_sharing',
+						'script' => 'list.php',
+						'order' => 15,
+						'name' => \OC::$server->getL10N('files_sharing')->t('Shared with you'),
+					],
+					[
+						'id' => 'sharinglinks',
+						'appname' => 'files_sharing',
+						'script' => 'list.php',
+						'order' => 17,
+						'name' => \OC::$server->getL10N('files_sharing')->t('Shared by link', []),
+					],
+					[
+						'id' => 'deletedshares',
+						'appname' => 'files_sharing',
+						'script' => 'list.php',
+						'order' => 19,
+						'name' => \OC::$server->getL10N('files_sharing')->t('Deleted shares'),
+					],
+				],
+				'active' => false,
+				'icon' => '',
+				'type' => 'link',
+				'expandedState' => 'show_sharing_menu',
+				'defaultExpandedState' => false,
+			]
 		]);
 
 		$expected = new Http\TemplateResponse(
@@ -240,6 +283,26 @@ class ViewControllerTest extends TestCase {
 						'id' => 'trashbin',
 						'content' => null,
 					],
+					'sharingout' => [
+						'id' => 'sharingout',
+						'content' => null,
+					],
+					'sharingin' => [
+						'id' => 'sharingin',
+						'content' => null,
+					],
+					'sharinglinks' => [
+						'id' => 'sharinglinks',
+						'content' => null,
+					],
+					'deletedshares' => [
+						'id' => 'deletedshares',
+						'content' => null,
+					],
+					'shareoverview' => [
+						'id' => 'shareoverview',
+						'content' => null,
+					],
 				],
 				'hiddenFields' => [],
 			]
diff --git a/apps/files_external/js/app.js b/apps/files_external/js/app.js
index 859a820f14c13a5628ccb3bc612ee06d28968ad5..d3f738dcf8a811e3faa62f63d48356f4d293c3cd 100644
--- a/apps/files_external/js/app.js
+++ b/apps/files_external/js/app.js
@@ -29,7 +29,6 @@ OCA.External.App = {
 		this.fileList = new OCA.External.FileList(
 			$el,
 			{
-				scrollContainer: $('#app-content'),
 				fileActions: this._createFileActions()
 			}
 		);
diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js
index 76d52cfe9e064de808ee66bbfbabb061de718ee6..750f66236ae3dfa5699797c61c8ae44d7fa4812c 100644
--- a/apps/files_sharing/js/app.js
+++ b/apps/files_sharing/js/app.js
@@ -32,7 +32,6 @@ OCA.Sharing.App = {
 			$el,
 			{
 				id: 'shares.self',
-				scrollContainer: $('#app-content'),
 				sharedWithUser: true,
 				fileActions: this._createFileActions(),
 				config: OCA.Files.App.getFilesConfig()
@@ -55,7 +54,6 @@ OCA.Sharing.App = {
 			$el,
 			{
 				id: 'shares.others',
-				scrollContainer: $('#app-content'),
 				sharedWithUser: false,
 				fileActions: this._createFileActions(),
 				config: OCA.Files.App.getFilesConfig()
@@ -78,7 +76,6 @@ OCA.Sharing.App = {
 			$el,
 			{
 				id: 'shares.link',
-				scrollContainer: $('#app-content'),
 				linksOnly: true,
 				fileActions: this._createFileActions(),
 				config: OCA.Files.App.getFilesConfig()
@@ -101,7 +98,6 @@ OCA.Sharing.App = {
 			$el,
 			{
 				id: 'shares.deleted',
-				scrollContainer: $('#app-content'),
 				showDeleted: true,
 				sharedWithUser: true,
 				fileActions: this._restoreShareAction(),
@@ -125,7 +121,6 @@ OCA.Sharing.App = {
 			$el,
 			{
 				id: 'shares.overview',
-				scrollContainer: $('#app-content'),
 				config: OCA.Files.App.getFilesConfig(),
 				isOverview: true
 			}
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 06dc6a07d480f4c721f3e976bae0de7737507ae0..35ffd9ff65eba4e57eb238ee0a8da0f9a4741fbd 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -67,7 +67,6 @@ OCA.Sharing.PublicApp = {
 				$el,
 				{
 					id: 'files.public',
-					scrollContainer: $('#app-content'),
 					dragOptions: dragOptions,
 					folderDropOptions: folderDropOptions,
 					fileActions: fileActions,
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 81729c179fcf688bd350a558050b7f0affa7a76b..1c552b7d4767ef6f141f727f88a61402405a7fa6 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -2,7 +2,7 @@
 /** @var $l \OCP\IL10N */
 /** @var $_ array */
 ?>
-
+<div id="app-content">
 <?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>
 	<link rel="image_src" href="<?php p($_['previewImage']); ?>" />
 <?php endif; ?>
@@ -90,3 +90,4 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
 			   data-url="<?php p(\OC::$server->getURLGenerator()->linkTo('files', 'ajax/upload.php')); ?>" />
 	</div>
 <?php endif; ?>
+</div>
\ No newline at end of file
diff --git a/apps/files_trashbin/js/app.js b/apps/files_trashbin/js/app.js
index 002c01bf96753a09985e18fdbb0af57069b19c0c..5c29c1232bb716bdd2bffac9ea9a71fd86de5fdf 100644
Binary files a/apps/files_trashbin/js/app.js and b/apps/files_trashbin/js/app.js differ
diff --git a/apps/systemtags/js/app.js b/apps/systemtags/js/app.js
index e027c0be123080cd225bdcc709785cdbf27814da..04ac53d3b32475b6e867527054c437d2f246ea94 100644
--- a/apps/systemtags/js/app.js
+++ b/apps/systemtags/js/app.js
@@ -27,7 +27,6 @@
 				$el,
 				{
 					id: 'systemtags',
-					scrollContainer: $('#app-content'),
 					fileActions: this._createFileActions(),
 					config: OCA.Files.App.getFilesConfig()
 				}
diff --git a/core/css/apps.scss b/core/css/apps.scss
index 86f0e622405d3d4d0b7676c987a7e1ca47a748b9..f0c168eee7195b7d05cac7594bf85e8c7d4eeb97 100644
--- a/core/css/apps.scss
+++ b/core/css/apps.scss
@@ -74,13 +74,15 @@ kbd {
 /* Navigation: folder like structure */
 #app-navigation {
 	width: $navigation-width;
-	position: sticky;
+	position: fixed;
 	top: $header-height;
 	left: 0;
-	z-index: 1500;
+	z-index: 500;
 	overflow-y: auto;
 	overflow-x: hidden;
-	height: calc(100vh - #{$header-height});
+	// Do not use vh because of mobile headers
+	// are included in the calculation
+	height: calc(100% - #{$header-height});
 	box-sizing: border-box;
 	background-color: var(--color-main-background);
 	-webkit-user-select: none;
@@ -170,6 +172,7 @@ kbd {
 				> ul {
 					opacity: 0;
 					max-height: 0;
+					overflow-y: hidden;
 					/* bezier override the hide/slow effect due to the 2000 max-height */
 					transition: max-height 1000ms cubic-bezier(0, 1, 0, 1),
 								opacity 250ms ease-in-out;
@@ -523,7 +526,7 @@ kbd {
 	.app-navigation-entry-deleted {
 		display: inline-flex;
 		padding-left: 44px;
-		transform: translateX(250px);
+		transform: translateX(#{$navigation-width});
 		.app-navigation-entry-deleted-description {
 			position: relative;
 			white-space: nowrap;
@@ -580,12 +583,19 @@ kbd {
 
 
 /* CONTENT  --------------------------------------------------------- */
+#content-wrapper {
+	// everything not related to content but needs to be on the window
+	// goes here (popups, tooltips...)
+	position: relative;
+	min-height: 100%;
+	display: unset;
+}
 #content {
-	/* header height */
-	padding-top: $header-height;
 	box-sizing: border-box;
 	position: relative;
 	display: flex;
+	margin-top: $header-height;
+	min-height: 100%;
 }
 
 /* APP-CONTENT AND WRAPPER ------------------------------------------ */
@@ -594,9 +604,13 @@ kbd {
 	z-index: 1000;
 	background-color: var(--color-main-background);
 	position: relative;
-	min-height: calc(100vh - #{$header-height});
+	min-height: 100%;
 	flex-basis: 100vw;
 	overflow: auto;
+	/* margin if navigation element is here */
+	#app-navigation  + & {
+		margin-left: $navigation-width;
+	}
 	/* no top border for first settings item */
 	> .section:first-child {
 		border-top: none;
diff --git a/core/css/header.scss b/core/css/header.scss
index 7aeaed92265cf3ae8a6bc3bf56594a5197597fac..b7565281218aca546c608582b57a832c6b14f763 100644
--- a/core/css/header.scss
+++ b/core/css/header.scss
@@ -46,8 +46,7 @@
 	display: inline-flex;
 	position: fixed;
 	top: 0;
-	left: 0;
-	right: 0;
+	width: 100%;
 	z-index: 2000;
 	height: $header-height;
 	background-color: var(--color-primary);
diff --git a/core/css/ie.scss b/core/css/ie.scss
index ec7f51065e426e0402b9081a34db888393fb1d44..a4d2c8336ecb9b15c497bfb76726e0df404bf7d7 100644
--- a/core/css/ie.scss
+++ b/core/css/ie.scss
@@ -1,5 +1,4 @@
 
-#app-navigation,
 #app-sidebar {
 	position: fixed !important;
 }
diff --git a/core/css/mobile.scss b/core/css/mobile.scss
index b0f85250493b369d413506ed02141eee2d97cca0..93e2909a51085b98773d40c5c46935e4933e3f09 100644
--- a/core/css/mobile.scss
+++ b/core/css/mobile.scss
@@ -20,7 +20,7 @@
 
 	/* APP SIDEBAR TOGGLE and SWIPE ----------------------------------------------*/
 	#app-navigation {
-		transform: translateX(-250px);
+		transform: translateX(-#{$navigation-width});
 	}
 	.snapjs-left {
 		#app-navigation {
@@ -28,8 +28,8 @@
 		}
 	}
 
-	#app-content {
-		margin-left: -$navigation-width;
+	#app-navigation + #app-content {
+		margin-left: 0;
 	}
 
 
diff --git a/core/css/public.scss b/core/css/public.scss
index 2ddca32c884e4bd7f8bba58d8a2a449b8b823807..19b90064229e7ac7c93ed61f9e755d080155a8ba 100644
--- a/core/css/public.scss
+++ b/core/css/public.scss
@@ -44,4 +44,19 @@
 	.ie #content {
 		display: inline-block;
 	}
+
+
+	p.info {
+		margin: 20px auto;
+		text-shadow: 0 0 2px rgba(0, 0, 0, .4);
+		-moz-user-select: none;
+		-ms-user-select: none;
+		user-select: none;
+	}
+	p.info, form fieldset legend,
+	#datadirContent label,
+	form fieldset .warning-info,
+	form input[type='checkbox']+label {
+		text-align: center;
+	}
 }
diff --git a/core/css/styles.scss b/core/css/styles.scss
index 9652b02e9d2adddc0b022744f802a4b6f54845fd..3ca0d8044432915fff263b9fb87e0208775a3f34 100644
--- a/core/css/styles.scss
+++ b/core/css/styles.scss
@@ -89,7 +89,6 @@ body {
 	line-height: 1.6em;
 	font-family: var(--font-face);
 	color: var(--color-main-text);
-	height: auto;
 }
 
 .two-factor-header {
diff --git a/core/js/js.js b/core/js/js.js
index c1713539f4fccb896858d4b981ba0c0d87fd2af6..ef80186b9850a70e64bcc4e0685b3f3b523c9d14 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1614,7 +1614,7 @@ function initCore() {
 		var snapper = new Snap({
 			element: document.getElementById('app-content'),
 			disable: 'right',
-			maxPosition: 250,
+			maxPosition: 300, // $navigation-width
 			minDragDistance: 100
 		});
 		$('#app-content').prepend('<div id="app-navigation-toggle" class="icon-menu" style="display:none;"></div>');
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index 2d4fc72666102a254eb795d152f16f5d094d4b31..8bb8e8ba3ca79ed6a0646cfc00e54feb78309a1c 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -18,6 +18,10 @@
 	</head>
 	<body id="body-public">
 		<?php include 'layout.noscript.warning.php'; ?>
-		<?php print_unescaped($_['content']); ?>
+		<div id="content-wrapper">
+			<div id="content" class="app-public" role="main">
+				<?php print_unescaped($_['content']); ?>
+			</div>
+		</div>
 	</body>
 </html>
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index 07aff03127d11b4fb1c5c130ed713e37ec8d20a0..afdd5656be4303ddc2c86845f3789e3ae670b05c 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -70,9 +70,11 @@
 		</div>
 		<?php } ?>
 	</header>
-	<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
-		<?php print_unescaped($_['content']); ?>
-	</div>
+	<div id="content-wrapper">
+		<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
+			<?php print_unescaped($_['content']); ?>
+		</div>
+	</div
 	<?php if($template->getFooterVisible()) { ?>
 	<footer>
 		<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
diff --git a/tests/acceptance/features/bootstrap/SettingsMenuContext.php b/tests/acceptance/features/bootstrap/SettingsMenuContext.php
index fd9b9424c9d7e8ec550f0653094b27300516e858..3dd5022ecc9de073e58c5a21ee3d3cfc627562f2 100644
--- a/tests/acceptance/features/bootstrap/SettingsMenuContext.php
+++ b/tests/acceptance/features/bootstrap/SettingsMenuContext.php
@@ -31,8 +31,17 @@ class SettingsMenuContext implements Context, ActorAwareInterface {
 	/**
 	 * @return Locator
 	 */
-	public static function settingsMenuButton() {
+	public static function settingsSectionInHeader() {
 		return Locator::forThe()->xpath("//*[@id = 'header']//*[@id = 'settings']")->
+				describedAs("Settings menu section in the header");
+	}
+
+	/**
+	 * @return Locator
+	 */
+	public static function settingsMenuButton() {
+		return Locator::forThe()->id("expand")->
+				descendantOf(self::settingsSectionInHeader())->
 				describedAs("Settings menu button");
 	}
 
@@ -40,7 +49,8 @@ class SettingsMenuContext implements Context, ActorAwareInterface {
 	 * @return Locator
 	 */
 	public static function settingsMenu() {
-		return Locator::forThe()->id("expanddiv")->descendantOf(self::settingsMenuButton())->
+		return Locator::forThe()->id("expanddiv")->
+				descendantOf(self::settingsSectionInHeader())->
 				describedAs("Settings menu");
 	}