Internet Explorer 6 Vertical Scroll Bar Not Appearing
 
Rating: 282 user(s) have rated this article 4.7 out of 5 stars
Posted by: jstrosch01, on 3/27/2008, in category "Working with HTML"
Views: this article has been read 4179 times
Location: United States


Delicious Bookmark this on Delicious

During some recent development I ran into a problem with IE6's vertical scroll bar not appearing on a DIV when the content extened past the DIV's height.  The overflow was working fine with FireFox and IE7, so I really wasn't sure where to begin with this one.  After futively scouring the internet for an hour I finally stumbled upon my answer by simply adding/removing styles in the CSS where the DIV was getting it's attributes.  Here's the original CSS:

/* Styles.css */

#rightContent {

   height: 340px;
   overflow: auto;

}

 And this is the DIV:

<!-- SomePage.aspx -->

<div id="rightContent">  <div> 

Since I'm creating this content dynamically I'm using ASP.NET and adding content via the page's code-behind file (not discussed here).  At this point I was not getting the vertical scroll bar in IE6.  You'll notice that I don't have the position set and that is what I was missing.  After setting the position to relative (which is how I wanted this DIV to layout anyway)  the vertical scrollbar would appear when the content extended past the DIV's height.

/* Styles.css */

#rightContent {

   Position: relative;
   height: 340px;
   overflow: auto;

}

 

Share and Bookmark

LinkedIn Google Del.icio.us Digg Reddit Stumble Upon

DISCLAIMER: This information is provided "as is". The author, publishers and marketers of this information disclaim any loss or liability, either directly or indirectly as a consequence of applying the information presented herein, or in regard to the use and application of said information. No guarantee is given, either expressed or implied, in regard to the merchantability, accuracy, or acceptability of the information.


How would you rate this article?

User Feedback
Comment posted by Siva on Monday, July 13, 2009 4:18 PM
Thanks a lot. This fixed my issue !

Post your comment
Name:
Comment:
Insert Cancel
Questions...
Have you upgraded to Windows 7?


Archived Polls