Sticky widget on ServicePortal

Community Alums
Not applicable

Anybody have any idea how to create a sticky widget on the ServicePortal? I've tried some of the traditional methods and they don't seem to work...

an example would be the behavior of the sidebar in this link:

http://getbootstrap.com/getting-started/

1 REPLY 1

Matthew Glenn
Kilo Sage

I had this somewhat working for our Order Guides on the Portal, but it got a bit funky from time to time on Tablets, so I never pushed to Prod. I'm a noob when it comes to this stuff, so that probably explains the funkiness



For that Order Guide page, I wanted the Cart on the right side of the page to follow a scroll, just like what you see below. Notice the scroll bar on the right is pretty far down the page, but my cart is still with me


find_real_file.png



To accomplish this, I simply added a unique class to the Cart div (.fixedDiv in my case)


find_real_file.png



Then in the CSS section of the Widget, I added a few media queries and used the position and a few other properties to set where the div show be


@media (min-width: 1025px) {


      .fixedDiv


      {


              position: fixed;


              top: 135px;


              margin-right: 100px;


      }


}



@media (min-width: 768px) and (max-width: 1023px){


      .fixedDiv


      {


              position: fixed;


              top: 169px;


      }


}




Not pretty, but it may be a starting point for you