Title: scrollbar   for  posts
Last modified: August 19, 2016

---

# scrollbar for posts

 *  Resolved [newtechnology007](https://wordpress.org/support/users/newtechnology007/)
 * (@newtechnology007)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/scrollbar-for-posts/)
 * Hello, i want to be able to scroll the post only, not side bars, i have tried,
   i have this code, but when i insert new post overlays, i am using Simply Basic
   1.5
    this is in the main index.
 *     ```
       <?php get_header(); ?>
   
       <script language="JavaScript">
       <!--
       function MM_reloadPage(init) {  //reloads the window if Nav4 resized
         if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
           document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
         else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
       }
       MM_reloadPage(true);
       // -->
       </script>
   
       <div id="Layer1" style="position:absolute; left:100px; top:108px; width:519px; height:550px; z-index:5; overflow: scroll">
       <div id="main">
   
       <div id="content">
       <?php if (have_posts()) : ?>
   
       			<?php while (have_posts()) : the_post(); ?>
   
       				<div class="post" id="post-<?php the_ID(); ?>">
   
       					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2></div>
       					<span class="date"><?php the_time('F jS, Y') ?><?php/* the_author() */?></span>
   
       					<div class="entry">
       						<?php the_content('Continue Reading &raquo;'); ?>
       						<?php wp_link_pages(); ?>
       					</div>
   
       					<span class="metadata">
       						Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
       					</span>
   
       				</div>
   
       			<?php endwhile; ?>
   
       			<p><?php posts_nav_link(' - ','« Previous','Next »') ?></p>
   
       		<?php else : ?>
   
       			<h2>Not Found</h2>
       			<p>Sorry, but the page you are looking for seems not to be here right now. Would you like to try again using the search feature?</p>
       			<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
       			<form method="get" class="searchform" action="<?php bloginfo('home'); ?>/">
       			<div><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" class="search_input" />
       			<input type="submit" class="searchsubmit" value="Search" />
       			</div>
       			</form>	
   
       		<?php endif; ?>
   
       		</div>
   
       <?php get_sidebar(); ?>
   
       	</div>
   
       <?php get_footer(); ?>
       ```
   

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

 *  [drewactual](https://wordpress.org/support/users/drewactual/)
 * (@drewactual)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/scrollbar-for-posts/#post-718595)
 * don’t try to force it with php script.
 * in your css file, find .post…. add to it:
 * height: 400px; /*or your defined height*/
    max-height: 400px; /*should max your
   height*/ overflow: scroll;
 *  Thread Starter [newtechnology007](https://wordpress.org/support/users/newtechnology007/)
 * (@newtechnology007)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/scrollbar-for-posts/#post-718788)
 * thanks so much, your information was very helpful. 🙂

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

The topic ‘scrollbar for posts’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [newtechnology007](https://wordpress.org/support/users/newtechnology007/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/scrollbar-for-posts/#post-718788)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
