static sidebar
-
Hi guys
How can I get the sidebar static (not scrolling) at all time/on all sites/posts?
thx for your help!
Michel
-
It would depend on how many items are in your sidebar on whether or not this would work.
Can you provide a link to your site?Hi
There are 4 widgets in it (menu, wp-calendar, text, rss from blog). Can’t provide a link, I’m working on it my local server (MAMP on Mac), sorry…
Isn’t there a code (like “position:fixed”) that I can insert anywhere?That’s the sidebar.php:
<?php /** * The Sidebar containing the main widget areas. * * @package Gridster */ ?> <div id="container"> <div id="sidebar"> <h1 id="blogtitle"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo('name'); ?></a></h1> <p class="tagline"><?php bloginfo( 'description' ); ?></p> <div class="sidebarwidget"> <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> </div> <?php do_action( 'before_sidebar' ); ?> <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?> <?php get_search_form(); ?> <h3 class="sidetitle"><?php _e( 'Archives', 'gridster' ); ?></h1> <ul> <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?> </ul> <h3 class="sidetitle"><?php _e( 'Meta', 'gridster' ); ?></h1> <?php endif; // end sidebar widget area ?> </div><!-- End Sidebar -->any idea?
This might cause trouble if you have too much info in your sidebar as it wont show the bottom on smaller screens.
#sidebar { position: fixed; }Ok, thanks, I’ll try it… Where do I put this code?
Either use a child theme or use a custom css plugin.
The topic ‘static sidebar’ is closed to new replies.
