79391086

Date: 2025-01-27 14:18:26
Score: 0.5
Natty:
Report link

Have u tried to use js ?

Maybe you can get both containers (stick-container) and window height. Afterwards by using foreach method you can iterate these containers. and check if one of the container's height less than window height then add aligh-top class to that container and also remove align bottom class from it.

 .align-top {
        align-self: start;
        top: 0;
    }

    .align-bottom {
        align-self: end;
        bottom: 0;
    }

inside foreach method

 if (containerHeight < windowHeight) {
                container.classList.add('align-top');
                container.classList.remove('align-bottom');
            } else {
                container.classList.add('align-bottom');
                container.classList.remove('align-top');
            }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Gülü Əhmədova