[Resolved] Making a sidebar sticky

Home Forums Support [Resolved] Making a sidebar sticky

Home Forums Support Making a sidebar sticky

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1535533
    Hasan

    Hi!

    I am trying to make the sidebar sticky for desktop only with the below code, but it is not working. Please help fixing it.

    @media (min-width: 800px) {
      #tour-sidebar {
          position: -webkit-sticky;
          position: sticky;
          top: 100px;
      }
    }

    Thanks!

    #1535769
    David
    Staff
    Customer Support

    Hi there,

    add this CSS:

    .inside-right-sidebar {
        height: 100%;
    }
    #1536355
    Hasan

    Worked perfectly. Thanks, David!

    I have another issue now since it is making only the first part of the sidebar sticky and the other part is scrolling past it. How can I make the whole sidebar sticky in general? If I apply the code for #ride-sidebar ID, it does not work.

    #1536370
    David
    Staff
    Customer Support

    Remove the CSS i provided.
    And then change your CSS to:

    @media (min-width: 800px) {
      .inside-right-sidebar {
          position: -webkit-sticky;
          position: sticky;
          top: 100px;
      }
    }
    #1536377
    Hasan

    Awesome! Thanks a lot!! 🙂

    #1536378
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.