[shell-perf-web] Wrap sidebar and body in a "content" div



commit d2d052f9a1a47424585621c74900f5d27937010f
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue May 25 20:35:12 2010 -0400

    Wrap sidebar and body in a "content" div
    
    Adding an extra div allows us to reliably put the sidebar beneath the
    header without worrying about the margins that are chosen for the
    main div.

 static/shell-perf.css |    5 ++++-
 templates/base.html   |   12 +++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/static/shell-perf.css b/static/shell-perf.css
index fdb9568..e2bac4f 100644
--- a/static/shell-perf.css
+++ b/static/shell-perf.css
@@ -2,6 +2,10 @@ body {
     background: white;
 }
 
+#content {
+    margin-top: 2.5em;
+}
+
 /* Anchors */
 a {
     color: #3465a4;
@@ -113,7 +117,6 @@ a:hover {
 
 #main {
     width: 50em;
-    margin-top: 2.5em;
     margin-left: 15em;
 }
 
diff --git a/templates/base.html b/templates/base.html
index 36a1c2d..18e110f 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -7,12 +7,14 @@
     <link rel="stylesheet" type="text/css" href="/static/shell-perf.css" />
     <base href="{{ settings.BASE_URL }}home" />
   </head>
-  <body>
-    {% include "include/sidebar.html" %}
+  <body class="{{ page }}">
     {% include "include/header.html" %}
-    <div id="main">
-      {% block main %}
-      {% endblock %}
+    <div id="content">
+      {% include "include/sidebar.html" %}
+      <div id="main">
+	{% block main %}
+	{% endblock %}
+      </div>
     </div>
   </body>
 </html>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]