summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Robbins2006-11-16 20:48:00 (GMT)
committer Jeff Robbins2006-11-16 20:48:00 (GMT)
commit90d2ffe28e00aa1e373ed58395bc260b28d4e6ce (patch)
tree5fc5d95b2fe44fb7611df67f75400396cc696c02
parent4dd0f1bf5e06ce1390f8fb0ec58fd07588ca58b4 (diff)
working on fix for #89656
-rw-r--r--layout.css119
-rw-r--r--page.tpl.php36
2 files changed, 105 insertions, 50 deletions
diff --git a/layout.css b/layout.css
index b0f61b6..ca6384d 100644
--- a/layout.css
+++ b/layout.css
@@ -3,63 +3,106 @@
/**
* LAYOUT STYLES
*
-* Define CSS classes to implement the Holy Grail Layout
-* to create a table-free, 3-column, 2-column, or single column
-* layout depending on whether blocks are enabled in the left
-* or right columns
-* more info:
-* http://www.alistapart.com/articles/holygrail/
+* Define CSS classes to create a table-free,
+* 3-column, 2-column, or single column layout
+* depending on whether blocks are enabled in the
+* left or right columns.
*/
+/**
+ * Layout
+ */
+
+#container {
+ margin: 0 auto;
+ /*padding: 0 20px;*/
+ max-width: 1270px;
+}
+
+/* With 3 columns, require a minimum width of 1000px to ensure there is enough horizontal space. */
+body.both-sidebars {
+ /*min-width: 980px;*/
+}
+/* With 2 columsn, require a minimum width of 800px. */
+body.sidebar-left, body.sidebar-right {
+ /*min-width: 780px;*/
+}
+
+/* We must define 100% width to avoid the body being too narrow for near-empty pages */
#main {
- padding: 10px 10px; /* main padding */ /* horizontal padding considers border width */
+ float: left;
+ width: 100%;
}
-#container.withleft #main {
- margin-left: 199px;
- voice-family: "\"}\"";
- voice-family: inherit;
- margin-left: 200px;
+/* So we move the #main container over the sidebars to compensate */
+body.sidebar-left #main {
+ margin-left: -210px;
+}
+body.sidebar-right #main {
+ margin-right: -210px;
+}
+body.both-sidebars #main {
+ margin: 0 -210px;
}
-#container.withright #main {
- margin-right: 199px;
- voice-family: "\"}\"";
- voice-family: inherit;
- margin-right: 200px;
+#squeeze {
+ position: relative;
+ padding: 0 1em;
}
-html>body #container.withleft #main {
- margin-left: 200px;
+/* And add blanks left and right for the sidebars to fill */
+body.sidebar-left #squeeze {
+ margin-left: 210px;
+}
+body.sidebar-right #squeeze {
+ margin-right: 210px;
+}
+body.both-sidebars #squeeze {
+ margin: 0 210px;
}
-html>body #container.withright #main {
- margin-right: 200px;
+/* We ensure the sidebars are still clickable using z-index */
+#container .sidebar {
+ margin: 0 0 5em;
+ width: 210px;
+ float: left;
+ z-index: 2;
+ position: relative;
+}
+
+#container .sidebar .block {
+ margin: 0 0 1.5em 0;
}
-#sidebar-left {
- float:left;
- width:180px;
- padding: 0 10px 0; /* left-side padding */
+#sidebar-left .block {
+ padding: 0 15px 0 0px;
}
-#sidebar-right {
- float:right;
- width:180px;
- padding:0 0 0 10px; /* right-side padding */ /* horizontal padding considers border width */
+
+#sidebar-right .block {
+ padding: 0 0px 0 15px;
+}
+
+.block .content {
+ margin: 0.5em 0;
}
#footer {
+ float: none;
clear: both;
+ margin: 4em 0 -3em;
+}
+
+
+/*
+body.sidebar-left #footer {
+ margin-left: -210px;
}
-* html body {
- overflow: hidden;
+body.sidebar-right #footer {
+ margin-right: -210px;
+}
+
+body.both-sidebars #footer {
+ margin: 0 -210px;
}
-* html #footer-wrapper {
- float: left;
- position: relative;
- width: 100%;
- padding-bottom: 10010px;
- margin-bottom: -10000px;
-} \ No newline at end of file
diff --git a/page.tpl.php b/page.tpl.php
index 1caac58..b2f3ee9 100644
--- a/page.tpl.php
+++ b/page.tpl.php
@@ -37,12 +37,12 @@
</div>
<?php endif; ?>
- </div>
+ </div> <!-- /name-and-slogan -->
- </div>
+ </div> <!-- /logo-title -->
- <div class="menu <?php if ($primary_links) { print "withprimary"; } if ($secondary_links) { print " withsecondary"; } ?> ">
+ <div id="navigation" class="menu <?php if ($primary_links) { print "withprimary"; } if ($secondary_links) { print " withsecondary"; } ?> ">
<?php if ($primary_links): ?>
<div id="primary" class="clear-block">
<?php print theme('menu_links', $primary_links); ?>
@@ -54,7 +54,7 @@
<?php print theme('menu_links', $secondary_links); ?>
</div>
<?php endif; ?>
- </div>
+ </div> <!-- /navigation -->
<?php if ($header || $breadcrumb): ?>
<div id="header-region">
@@ -63,9 +63,9 @@
</div>
<?php endif; ?>
- </div>
+ </div> <!-- /header -->
- <div id="container" class="<?php if ($sidebar_left) { print "withleft"; } if ($sidebar_right) { print " withright"; }?> ">
+ <div id="container">
<div id="main" class="column">
<?php if ($mission): ?><div id="mission"><?php print $mission; ?></div><?php endif; ?>
@@ -82,26 +82,38 @@
<?php if ($sidebar_left): ?>
<div id="sidebar-left" class="column sidebar">
<?php print $sidebar_left; ?>
- </div>
+ </div> <!-- /sidebar-left -->
<?php endif; ?>
+
+ <div id="main" class="column"><div id="squeeze">
+ <?php if ($mission): ?><div id="mission"><?php print $mission; ?></div><?php endif; ?>
+ <?php if ($content_top):?><div id="content-top"><?php print $content_top; ?></div><?php endif; ?>
+ <?php if ($title): ?><h1 class="title"><?php print $title; ?></h1><?php endif; ?>
+ <?php if ($tabs): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
+ <?php print $help; ?>
+ <?php print $messages; ?>
+ <?php print $content; ?>
+ <?php print $feed_icons; ?>
+ <?php if ($content_bottom): ?><div id="content-bottom"><?php print $content_bottom; ?></div><?php endif; ?>
+ </div></div> <!-- /squeeze /main -->
<?php if ($sidebar_right): ?>
<div id="sidebar-right" class="column sidebar">
<?php print $sidebar_right; ?>
- </div>
+ </div> <!-- /sidebar-right -->
<?php endif; ?>
- </div>
+ </div> <!-- /container -->
<div id="footer-wrapper">
<div id="footer">
<?php print $footer_message; ?>
- </div>
- </div>
+ </div> <!-- /footer -->
+ </div> <!-- /footer-wrapper -->
<?php print $closure; ?>
- </div>
+ </div> <!-- /page -->
</body>
</html> \ No newline at end of file