Title: Fixed sidebar &#8211; no CSS knowledge
Last modified: August 20, 2016

---

# Fixed sidebar – no CSS knowledge

 *  [jenniesteinberg](https://wordpress.org/support/users/jenniesteinberg/)
 * (@jenniesteinberg)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/fixed-sidebar-no-css-knowledge/)
 * Hi there! I’ve searched the forums and been unable to find an answer to this 
   question that I can implement successfully… I’m trying to create a fixed sidebar
   that will remain in place while content scrolls. I have zero CSS knowledge (though
   I do have some 15-year-old html knowledge), so a lot of what I’ve looked at here
   is really hard for me to understand.
 * My website is [http://www.jenniesteinberg.com](http://www.jenniesteinberg.com)
 * I see two files that look like they might be my sidebar. One is sidebar-default.
   php and looks like this:
 *     ```
       <?php
       /**
        * Template part file for default sidebar.
        *
        *
        * @package Raindrops
        * @since Raindrops 0.1
        */
       ?>
       <div class="lsidebar">
       <ul>
       <?php
       	if (!dynamic_sidebar('sidebar-1')){
       		raindrops_sidebar_menus( 'default' );
       	}
       ?>
       </ul>
       </div>
       ```
   
 * And the other is just called “Sidebar” and then says “sidebar.php” in parentheses.
   That code looks like this:
 *     ```
       <?php
       /**
       * Template part file for Sidebar.
       *
       *
       * @package Raindrops
       */
       ?>
       <div class="sidebar">
       <ul>
       <?php if (!dynamic_sidebar('sidebar-1')){ ?>
       <?php wp_list_pages('title_li=<h2 class="h2">'. __( 'Pages', 'Raindrops').'</h2>' ); ?>
       <li><h2 class="h2"><?php _e( 'Archives', 'Raindrops' ); ?></h2>
         <ul>
           <?php wp_get_archives('type=monthly'); ?>
         </ul>
       </li>
       <?php wp_list_categories('show_count=1&title_li=<h2 class="h2">'. __( 'Categories', 'Raindrops'). '</h2>'); ?>
       <?php /* If this is the frontpage */ if ( is_front_page() || is_page() ) { ?>
       <?php wp_list_bookmarks(); ?>
       <li>
         <h2 class="h2">Meta<?php _e( 'Meta', 'Raindrops' ); ?></h2>
         <ul>
           <?php wp_register(); ?>
           <li>
             <?php wp_loginout(); ?>
           </li>
           <?php wp_meta(); ?>
         </ul>
       </li>
       <?php } ?>
       <?php } ?>
       </ul>
       </div>
       ```
   
 * I am using Raindrops theme.
 * Which of these files do I need to modify in order to have the sidebar be fixed
   while website visitors scroll through text?
 * Thanks,
 * Jennie

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/fixed-sidebar-no-css-knowledge/#post-2984148)
 * try:
 * `.lsidebar { position: fixed; }`
 * [http://www.w3schools.com/cssref/pr_class_position.asp](http://www.w3schools.com/cssref/pr_class_position.asp)
 *  Thread Starter [jenniesteinberg](https://wordpress.org/support/users/jenniesteinberg/)
 * (@jenniesteinberg)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/fixed-sidebar-no-css-knowledge/#post-2984191)
 * Where in the code would that go?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/fixed-sidebar-no-css-knowledge/#post-2984203)
 * it would possibly go into style.css;
 * for some reasons, adding this has the side effect of increasing the size of the
   sidebar (?)
 * instead, maybe try to use:
 * `.yui-b { position: fixed; }`
 * (only checked in Firefox14 for the given link; not tested in any other browsers
   or any other pages of your site)
 *  Thread Starter [jenniesteinberg](https://wordpress.org/support/users/jenniesteinberg/)
 * (@jenniesteinberg)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/fixed-sidebar-no-css-knowledge/#post-2984219)
 * Thank you so much! How do I get the header to do the same?
 *  Thread Starter [jenniesteinberg](https://wordpress.org/support/users/jenniesteinberg/)
 * (@jenniesteinberg)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/fixed-sidebar-no-css-knowledge/#post-2984222)
 * Actually, I realize that’s a totally separate question. I’ll close this and open
   a new one – thanks for your help!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Fixed sidebar – no CSS knowledge’ is closed to new replies.

## Tags

 * [Fixed sidebar](https://wordpress.org/support/topic-tag/fixed-sidebar/)
 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [jenniesteinberg](https://wordpress.org/support/users/jenniesteinberg/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/fixed-sidebar-no-css-knowledge/#post-2984222)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
