diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less
index 66607b5e91521bc38ef44a51a4f24b370cfc21a3..548ba72285a182bdb8a894d6d404a256f07c7943 100644
--- a/lib/tpl/dokuwiki/css/design.less
+++ b/lib/tpl/dokuwiki/css/design.less
@@ -349,11 +349,12 @@ form.search {
 ********************************************************************/
 
 .dokuwiki .pageId {
-    position: absolute;
-    top: -2.3em;
-    right: -1em;
+    float: right;
+    margin-right: -1em;
+    margin-bottom: -1px;
+    margin-top: -1.5em;
     overflow: hidden;
-    padding: 1em 1em 0;
+    padding: 0.5em 1em 0;
 
     span {
         font-size: 0.875em;
@@ -370,6 +371,7 @@ form.search {
 }
 
 .dokuwiki div.page {
+    clear: both;
     background: @ini_background;
     color: inherit;
     border: 1px solid @ini_background_alt;
@@ -396,8 +398,9 @@ form.search {
 }
 
 [dir=rtl] .dokuwiki .pageId {
-    right: auto;
-    left: -1em;
+    float: left;
+    margin-left: -1em;
+    margin-right: 0;
 }
 
 /* footer
diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php
index d4f9c39d1270717a4fafeab12b29025ce2ec09d5..b27567987b19031176eade97598d66ce7cb9692e 100644
--- a/lib/tpl/dokuwiki/detail.php
+++ b/lib/tpl/dokuwiki/detail.php
@@ -36,6 +36,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
 
             <!-- ********** CONTENT ********** -->
             <div id="dokuwiki__content"><div class="pad group">
+                <?php html_msgarea() ?>
 
                 <?php if(!$ERROR): ?>
                     <div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></span></div>
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 10c0bf91e5249f16ba6e4c7bde9d68e85cf7f4ee..165230e8a9fdca188e25b7a67e4d67e838776e90 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -49,6 +49,7 @@ $showSidebar = $hasSidebar && ($ACT=='show');
 
             <!-- ********** CONTENT ********** -->
             <div id="dokuwiki__content"><div class="pad group">
+                <?php html_msgarea() ?>
 
                 <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
 
diff --git a/lib/tpl/dokuwiki/tpl_header.php b/lib/tpl/dokuwiki/tpl_header.php
index 7d9c8834747a6f643847022cdddacfa214e925ee..ee51cbd01ce818806cec4fe4e45e37fb9f77ce48 100644
--- a/lib/tpl/dokuwiki/tpl_header.php
+++ b/lib/tpl/dokuwiki/tpl_header.php
@@ -85,7 +85,7 @@ if (!defined('DOKU_INC')) die();
         </div>
     <?php endif ?>
 
-    <?php html_msgarea() ?>
+
 
     <hr class="a11y" />
 </div></div><!-- /header -->