Skip Navigation

[Resolved] Cell does not stick

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by samuelel 6 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1082973
Capture.JPG

Hi,
I am editing a Layout for a custom post type. The layout contains several cells. I would like to make a tab cell sticky, so that it stays in the same position while scrolling. The tab cell is has Class: tab_class_1.

Adding the following CSS code (Layout CSS and JS Editor) does not result in a sticky tab (i.e. the tab scrolls with the rest of the page):

.tab_class_1 {
  position: sticky;
  top: 0;
} 

How can I fix this?

#1083179

The position:sticky CSS style requires an ancestor element with position:relative. Can you tell me if any ancestor elements of this cell use position:relative? If not, you must add one. I will need to see this in a browser to make CSS recommendations.

#1083198

Hi Christian,

Here it is: hidden link. The website is running on my PC.

Do you have any suggestions?

Thanks,
Samuele

#1083208

Hi Christian,

This fixes the problem

.tab_class_1 {
    position: sticky;
    top: 0px;
 }

It works once you add 'top: 0px' (or whatever appropriate value).