diff --git a/core/css/guest.css b/core/css/guest.css
index 26c8fbc9ccde8b8f517d5c2f80e63c4dd9970c5a..7fbab45b929fa690803b9fb7d7f5d982a4812a68 100644
--- a/core/css/guest.css
+++ b/core/css/guest.css
@@ -471,6 +471,10 @@ form .warning input[type='checkbox']+label {
 	color: #fff !important;
 }
 
+.body-login-container.two-factor {
+	max-width: 290px;
+	margin: 15px auto 0;
+}
 .two-factor-provider {
 	display: flex;
 	border-radius: 3px; /* --border-radius */
diff --git a/core/templates/twofactorselectchallenge.php b/core/templates/twofactorselectchallenge.php
index 86561cddb3638c78820b8291dd39f8bf9a4edbef..830b82b0415b19340eaf3ee6216d3a46b9fdf878 100644
--- a/core/templates/twofactorselectchallenge.php
+++ b/core/templates/twofactorselectchallenge.php
@@ -1,7 +1,7 @@
 <?php
 $noProviders = empty($_['providers']);
 ?>
-<div class="body-login-container update">
+<div class="body-login-container update two-factor">
 	<h2 class="two-factor-header"><?php p($l->t('Two-factor authentication')) ?></h2>
 	<?php if (!$noProviders): ?>
 	<p><?php p($l->t('Enhanced security is enabled for your account. Choose a second factor for authentication:')) ?></p>
diff --git a/core/templates/twofactorshowchallenge.php b/core/templates/twofactorshowchallenge.php
index e3270b80627b1b88dce7c3490f54d08bc2c4a8a0..3e789c7490dc2e1dec8239333fb316811fe55da4 100644
--- a/core/templates/twofactorshowchallenge.php
+++ b/core/templates/twofactorshowchallenge.php
@@ -11,7 +11,7 @@ $provider = $_['provider'];
 $template = $_['template'];
 ?>
 
-<div class="body-login-container update">
+<div class="body-login-container update two-factor">
 	<h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2>
 	<?php if ($error): ?>
 			<?php if($error_message): ?>