On my website, I have implemented fixed top and bottom sections using CSS with position: fixed;
Within these fixed sections, there is an absolutely positioned div element where the majority of my content is displayed. When the content exceeds the size of this element, I want scroll bars to appear on the right side of the screen (not within the element itself). To achieve this, I have applied overflow-y: scroll;
to the body element, similar to how it appears on Facebook.
While this setup works well for most aspects, I encounter issues with borders and backgrounds of the page element. The content visible initially includes both border and background, but once I scroll down to view overflow content, these visual elements disappear.
I've experimented with setting the height of the page using absolute (bottom: 105px
) and relative (height: 100%;
) methods, without success. Additionally, I attempted to address this by ending the content inside the page element with
<p style="clear: both"></p>
.
If anyone has suggestions or solutions for this issue, I would greatly appreciate it! Thank you!