Archived topic
fix position of side bars
8 replies · Started by Walter Schwarz on September 30, 2018
I would like to keep the side bars always on the same position and have just the main content scrollable as it is already. I am using the "Content Aware Sidebars" PlugIn.
Start page:

Same page: main content scrolled a little bit (via Photoshop :-) )

I have already tried a lot of CSS variations. Positioning and fixing worked, but when changing the screen size the distances between the side bars and the main content destroyed the overall picture. there were overlaps, for example.
Who knows CSS modifications that work?
Thank you,
Walter
Have you tried a plugin like this?: https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/
You should just need to provide the IDs of the sidebars.
Let me know :)
Basically "sticky-menu-or-anything-on-scroll" works. But there are some restrictions:
1) The actual version just deals with one menu. So both side-bars are not manageable. Improvement should be in next version.
2) If I have a longer menu that hides under the footer the content there is out of view. There is no "overflow-y: auto;"-functionality. But maybe I just do not know how to activate.
So I still need help.
Thank you,
Walter
What if you removed your custom CSS relating to the sticky sidebars now, and then add this:
.inside-right-sidebar,
.inside-left-sidebar {
max-height: 100%;
overflow-y: auto;
}
Let me know :)
It works so far - but the behaviour is not perfect.
Calling a page the first look is without a scroll bar - even if the text is longer:
I have to scroll a little bit the main page, that the plugin seems to start and the scrollbar of the side bar is activated:
How to get the first page started already knowing, that a scrollbar should be presented?
And there is still the bottleneck of just have one sidebar sticked.
Thank you for further ideas,
Walter
I suppose you could try replacing:
overflow-y: auto;
With:
overflow-y: scroll;
"overflow-y: scroll;" did not work properly. It created a kind of shadow scroll bar in the background. After further tests with two other plugins (Q2W3 Fixed Widget, WP Stickit) I stay with "sticky-menu-or-anything-on-scroll".
My settings are:
.inside-right-sidebar,
.inside-left-sidebar
max-height: 100%;
overflow-y: auto;
bottom:0px;
}
To have the scond side bar sticky as well I have to wait till the next major release.
I will stay with this solution so far.
Thank you Tom,
have a good day!
Walter
Glad you got something working :)
*** Addendum and update ***
At the end I deactivated the plugin "sticky-menu-or-anything-on-scroll".
At every page change it created a micro-flickering of the sticky sidebar containing a sub menu.
At the end it seems that there is no really professional sticky side bar plugin available.
But if someone knows one, please let me know ...
Have a good night,
Walter