/** * @file * Layout Styling (DIV Positioning) * * 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. * * This layout is based on the grid layout method. * http://www.w3.org/TR/css3-grid-layout/ * * Only CSS that affects the layout (positioning) of major elements should be * listed here. Such as: * display, position, float, clear, width, height, min-width, min-height * margin, border, padding, overflow */ /* * Body */ body { } #page-wrapper, .region-bottom { /* * If you want to make the page a fixed width and centered in the viewport, * this is the standards-compliant way to do that. See also the ie6.css file * for the necessary IE5/IE6quirks hack to center a div. */ margin-left: auto; margin-right: auto; width: 960px; } #page { display: grid; /* row heights can also be set here */ grid-rows: "header" "navbar" "main" "footer" "page-bottom"; /* 16 column grid, eg. http://960.gs/demo.html */ padding: 0 10px; grid-columns: 40px (20px 40px)[15]; /* 12 column grid, eg. http://960.gs/demo.html */ padding: 0 10px; grid-columns: 60px (20px 60px)[11]; } /* * Header */ #header { grid-column: 1 23; grid-row: "header"; } #header .section { } .region-header { } /* * Main (container for everything else) */ #main-wrapper { /* no longer neccesary */ } #main { /* no longer neccesary for layout, useful for styling. This still gets drawn * under all the "child" grid cells (ie. cells are drawn in source-order). * http://www.w3.org/TR/css3-grid-layout/#drawing-order-of-grid-items */ grid-column: 1 23; grid-row: "main"; } /* * Content */ #content, .no-sidebars #content { grid-column: 1 23; grid-row: "main"; } .sidebar-first #content { grid-column: 7 23; } .sidebar-second #content { grid-column: 1 17; } .two-sidebars #content { grid-column: 7 17; } #content .section { margin: 0; padding: 0; } /* * Navigation */ #navigation { grid-column: 1 23; grid-row: "navbar"; } .with-navigation #content, .with-navigation .region-sidebar-first, .with-navigation .region-sidebar-second { /* no longer neccesary */ } #navigation .section { } /* * First sidebar */ .region-sidebar-first { grid-column: 1 5; grid-row: "main"; } .region-sidebar-first .section { /* no margin/padding neccesary */ } /* * Second sidebar */ .region-sidebar-second { grid-column: 19 23 grid-row: "main"; } .region-sidebar-second .section { /* no margin/padding neccesary */ } /* * Footer */ .region-footer { grid-column: 1 23; grid-row: "footer" } /* * Page bottom */ .region-bottom /* See also the #page-wrapper declaration above that this div shares. */ { grid-column: 1 23; grid-row: "page-bottom" } /* * Prevent overflowing content */ #header, #content, #navigation, .region-sidebar-first, .region-sidebar-second, .region-footer, .region-bottom { overflow: visible; word-wrap: break-word; /* A very nice CSS3 property */ } /* * If a div.clearfix doesn't have any content after it and its bottom edge * touches the bottom of the viewport, Firefox and Safari will mistakenly * place several pixels worth of space between the bottom of the div and the * bottom of the viewport. Uncomment this CSS property to fix this. * Note: with some over-large content, this property might cause scrollbars * to appear on the #page-wrapper div. */ /* #page-wrapper { overflow-y: hidden; } */