Sticky widget on ServicePortal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2017 05:33 AM
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2017 10:24 AM
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
To accomplish this, I simply added a unique class to the Cart div (.fixedDiv in my case)
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