Browse Source

use wrap div with dynamic resizing

Thomas Buck 3 years ago
parent
commit
d5d010b94b
2 changed files with 9 additions and 8 deletions
  1. 7
    2
      page.html
  2. 2
    6
      static/css/style.css

+ 7
- 2
page.html View File

@@ -24,7 +24,7 @@
24 24
             print page.github
25 25
             print '">Fork me on GitHub</a></div></div>'
26 26
     %-->
27
-    <div id="nav">
27
+    <div id="wrap"><div id="nav">
28 28
         <ul>
29 29
             <li id="home"><a href="index.html">xythobuz.de</a></li>
30 30
             <!--%
@@ -52,7 +52,7 @@
52 52
                     print "</li>"
53 53
             %-->
54 54
         </ul>
55
-    </div>
55
+    </div></div>
56 56
     <div id="content">
57 57
         <!--%
58 58
             from datetime import datetime
@@ -137,7 +137,12 @@
137 137
             print '</script>'
138 138
     %-->
139 139
     <script type="text/javascript">
140
+        jQuery(window).resize(function() {
141
+            $('#wrap').css('height', $('#nav').css('height'));
142
+        });
140 143
         $(document).ready(function(){
144
+            $('#wrap').css('height', $('#nav').css('height'));
145
+
141 146
             var fontSize = parseInt($('body').css('font-size'), 10);
142 147
             var initialFontSize = fontSize;
143 148
             $('.inc').on('click', function() {

+ 2
- 6
static/css/style.css View File

@@ -30,12 +30,8 @@ hr {
30 30
         left: 0;
31 31
     }
32 32
 
33
-    #content {
34
-        padding-top: 5em;
35
-    }
36
-
37
-    #index-avatar {
38
-        margin-top: 1.5em;
33
+    #wrap {
34
+        height: 5em;
39 35
     }
40 36
 }
41 37
 

Loading…
Cancel
Save