• Resolved WebDocopy

    (@webdocopy)


    Hi.

    I have issue with setting offset in plugin PSTI. If I set class of header in offset value, it doesn’t work. It seems that the height of header is ignored. Only works if I set fixed value in pixels.

    Can you please help me with this issue.

    Thank you.

    BR

    Tomas

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author malihu

    (@malihu)

    Hello,

    I just tested your page and the .header offset value seems to be working as expected. Did you fix it or?

    Thread Starter WebDocopy

    (@webdocopy)

    Hi.

    Unfortunately it works only once. When you click on another menu item, the offset is gone.

    I think that the issue could be caused by sticky header settings. I am using fixed position together with top with minus value and transformY to create slide up animation. Here is the sticky header class and header class settings:

    /*Sticky Header */

    .sticky-header {

      background-color: color(3);

      position: fixed;

      top: -6.25rem;

      left: 0;

      width: 100%;

      transform: translateY(6.25rem);

      transition: transform .5s;

      box-shadow: 0px 4px 10px rgba(34,36,43,0.1);

    /*Header*/

    .header {

        width: 100%;

        height: 6.25rem;

        position: absolute;

        z-index: 10;

        top: 0px;

        left: 0px;

    I guess that transform of sticky header could cause the problem.

    What do you think?

    BR

    Tomas

    Plugin Author malihu

    (@malihu)

    Ah! I see. You are correct, indeed the translateY transformation causes the issue.

    You can achieve the same effect you’re having now by using the margin-top property (instead of translateY) and the offset will work as expected. Add the following to your CSS, test it and let me know:

    header.header.sticky-header {
        transform: translateY(0); 
        margin-top: 6.25rem;
        transition: margin-top .5s;
    }
    Thread Starter WebDocopy

    (@webdocopy)

    Hi.

    Thank you very much. It works like magic.

    One small change can make big difference.

    Tomas

    Plugin Author malihu

    (@malihu)

    Glad I helped ?? Let me know if you need more help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Offset value defined by class not working’ is closed to new replies.