Sidebar zjeżdża i jest pod postami. Z prawej strony pozostaje pusta przestrzeń.
Tutaj najważniejsze definicje CSS, aside to sidebar:
Kod
.group { display: inline-block; clear: both; }
#main-content { float: left; width: 960px; margin: 0px 0 0 0; }
aside {
float: left;
width: 200px;
margin-left: 30px;
background:#F8f8f8;
border:1px solid #E0E0E0;
/* Rounded corners */
-moz-border-radius:20px;
-khtml-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius:20px;
padding: 15px;
}
.post {
width: 450px;
margin: 0 0 40px 0;
background:#FFFFFF;
border:1px solid #E0E0E0;
/* Rounded corners */
-moz-border-radius:20px;
-khtml-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius:20px;
padding: 15px;
}
#center {
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
width: 960px;
}
#main-content { float: left; width: 960px; margin: 0px 0 0 0; }
aside {
float: left;
width: 200px;
margin-left: 30px;
background:#F8f8f8;
border:1px solid #E0E0E0;
/* Rounded corners */
-moz-border-radius:20px;
-khtml-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius:20px;
padding: 15px;
}
.post {
width: 450px;
margin: 0 0 40px 0;
background:#FFFFFF;
border:1px solid #E0E0E0;
/* Rounded corners */
-moz-border-radius:20px;
-khtml-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius:20px;
padding: 15px;
}
#center {
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
width: 960px;
}
Plik sidebar.php szablonu wordpress:
<aside> <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar Widgets')) : else : ?> <!-- All this stuff in here only shows up if you DON'T have any widgets active in this zone --> <?php get_search_form(); ?> <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> <ul> <?php wp_list_categories('show_count=1&title_li='); ?> </ul> <?php wp_list_bookmarks(); ?> <ul> <?php wp_register(); ?> <?php wp_meta(); ?> </ul> <ul> </ul> <?php endif; ?> </aside>
i footer.php: