diff --git a/refdoc/structure/modref.css b/refdoc/structure/modref.css
index 0173aae88dc1f3cb195d8722c66bac186824d8f6..f8e64072382f08005b9d5f09573aaa41e6f23be1 100644
--- a/refdoc/structure/modref.css
+++ b/refdoc/structure/modref.css
@@ -1,8 +1,18 @@
+body {
+	margin: 0;
+}
+
 body, td, th {
 	font-family: arial,helvetica,sans-serif;
-	font-size: 95%;
+	font-size: 13px;
+	color: #343434;
+	background: #ffffff;
 }
 
+blockquote { margin-bottom: 14px; }
+.diff      { padding: 6px }
+.title     { font-size: 14px; font-weight: bold; text-decoration: none }
+
 em {
 	font-weight: bold;
 	font-style: italic;
@@ -18,10 +28,45 @@ em {
 	color: #6666cc;
 }
 
+.navbar {
+	background: #f0f0f0;
+	float: left;
+	margin-left: 22px;
+	margin-top: 3px;
+	min-width: 181px;
+	overflow: hidden;
+}
+
 .sidebar {
+	background: #e0e0e0;
 	font-size: 95%;
+	margin: 3px;
+	overflow: hidden;
+	padding: 3px;
 }
 
+.left {
+	float: left;
+}
+
+.right {
+	float: right;
+	text-align:right;
+}
+
+.contentbox {
+	margin-right: 20px;
+	min-width: 520px;
+	overflow: hidden;
+	padding-left: 23px;
+	padding-right: 23px,
+}
+
+.navbox {
+	margin-right: 20px;
+	min-width: 520px;
+	overflow: hidden;
+}
 
 pre,code {
 	font-family: "andale mono", "monotype.com", "courier new", monospace;
@@ -30,7 +75,7 @@ pre,code {
 
 h1 {
 	font-family: arial,helvetica,sans-serif;
-	font-size: 140%;
+	font-size: 26px;
 	font-weight: bold;
 	color: #000066;
 }
@@ -40,6 +85,7 @@ h2 {
 	font-size: 125%;
 	font-weight: bold;
 	color: #000066;
+	margin-bottom: 4px;
 }
 
 h3 {
diff --git a/refdoc/structure/modref.html b/refdoc/structure/modref.html
index 4898958cfbd7bdadaac16fcccd85975b0d876d20..bca5b1b3cc4454a8324e968a740e7181b078b16a 100644
--- a/refdoc/structure/modref.html
+++ b/refdoc/structure/modref.html
@@ -3,9 +3,7 @@
     <title>Pike Reference Manual - $title$</title>
     <link rel='stylesheet' href='$style$' />
   </head>
-  <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"
-	bgcolor="#ffffff" text="#000000" link="#000099" alink="#002040"
-	vlink="#000099">
+  <body link="#0768b2" alink="#002040" vlink="#0768b2">
     <header>
       <div>
 	<div style="text-align:right;">Extracted from $version$ as of $date$.</div>
@@ -28,30 +26,26 @@
     </header>
 
     <div>
-      <div style="float:left; background:#f0f0f0;
-		  min-width:180px; margin-top:3px;">
+      <div class="navbar">
 	<nav>
 	  $navbar$
 	</nav>
       </div>
-      <div style="width:520px; overflow:hidden;">
+      <div class="navbox">
 	<nav>
-	  <div style="background:#e0e0e0; overflow:hidden; padding:3px;
-		      margin:3px;" class="sidebar">
-	    <a href="$prev_url$"
-	       style="float:left;"
+	  <div class="sidebar">
+	    <a href="$prev_url$" class="left"
 	       ><img src="$imagedir$prev.gif" hspace="3"
 		     border="0" alt="previous"
 		     >$prev_title$</a>
-	    <a href="$next_url$"
-	       style="float:right; text-align:right;"
+	    <a href="$next_url$" class="right"
 	       >$next_title$<img src="$imagedir$next.gif" hspace="3"
-					border="0" alt="next"
-					></a>
+				 border="0" alt="next"
+				 ></a>
 	  </div>
 	</nav>
       </div>
-      <div style="width:520px; overflow:hidden;">
+      <div class="contentbox">
 	<article>
 	  <h1>$type$ $title$</h1>
 	  $contents$