Skip to content

Instantly share code, notes, and snippets.

@bamb
Forked from mrdanadams/media.css
Created March 21, 2012 22:08
Show Gist options
  • Save bamb/2153690 to your computer and use it in GitHub Desktop.
Save bamb/2153690 to your computer and use it in GitHub Desktop.
css: wp rwd fluid grids
@media screen and (max-width: 650px) {
#container, #aside-container, #blog-title, #access { display: block; float: none; width: auto; margin: 0 3% 3% 3%; }
body { font-size: 14px; line-height: 16px; }
}
<?php
// create functions to make the opening and closing tag of our container div
function childtheme_abovemainasides() { ?>
<div id="aside-container">
<?php }
function childtheme_belowmainasides() { ?>
</div><!-- #aside-container -->
<?php }
// add the action into the extension points
add_action('thematic_abovemainasides', 'childtheme_abovemainasides', 10);
add_action('thematic_belowmainasides', 'childtheme_belowmainasides');
?>
// Located in sidebar.php
// Just before the main asides (commonly used as sidebars)
function thematic_abovemainasides() {
do_action('thematic_abovemainasides');
} // end thematic_abovemainasides
// Located in sidebar.php
// after the main asides (commonly used as sidebars)
function thematic_belowmainasides() {
do_action('thematic_belowmainasides');
} // end thematic_belowmainasides
/* sets the max width and centers the contents */
#wrapper { max-width: 960px; margin: 0px auto; }
/* our 2 column containers expressed as % of the container width */
#container { float: left; width: 72.5%; margin-right: 2%; }
#aside-container { float: left; width: 24.25%; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment