I have a div on the left side of my page for navigation links. Clicking on the title expands the subset of links. I have this div set to 100% of the page height, so the column occupies the entire left side of the page. The problem occurs when all subcategories are expanded. The content of the div runs at the bottom of the page, but does not add a scroll bar.
I tried setting the height to auto to see if this fixes the problem (ignoring the fact that it does not occupy the entire left side), but this also cannot be fixed.
So what do I need to do to get the scrollbar when the div expands beyond the height of the page? Then scroll the scroll bar if it is not needed.
Thanks.
.leftNavigation { display:block; position:fixed; width:200px; height:100%; top:140px; left:0; background-color:#f0f0f0;
}
<div class="leftNavigation"> <p class="linkHeader" id="townLinksHeader"><img src="img/image.jpg" width="200" height="40" alt="Sunnyvale, CA" /></p> <div class="links" id="townLinks"> <ul> <li><a href="">Link</a></li> <li><a href="">Link</a></li> <li><a href="">Link</a></li> <li><a href="">Link</a></li> </ul> </div>
There are 4 paragraphs / div in the left navigation div. Only a paragraph is displayed until clicked. Then the div links are displayed. When each of them expands, it runs at the bottom of the page, but does not add a scroll bar.
Adding overflow: auto hasn't changed anything.
source share