web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / How to make the list h...
Power Pages
Unanswered

How to make the list header sticky when scroll

(0) ShareShare
ReportReport
Posted on by 111

Want to make the below highlighted list header section sticky on top when scrolling the page down, and tried to add the below CSS into the list table's th > tr element, but not working, is this doable in Power Pages?

 

style="position: sticky; top: 0; z-index: 1030; background-color: #fff!important;"

 

jwnz_0-1677560419518.png

 

Categories:
I have the same question (0)
  • Fubar Profile Picture
    8,354 Super User 2025 Season 2 on at

    I don't know how much luck you will have getting exactly what you want but in general:

    • You can't set sticky on tr tags you need to set them on each column heading th tag inside the tr e.g on each th apply   position: sticky; top:0;
    • You will also have to override other values, for the List there is a class that sits on a div higher in the DOM called "view-grid", this class contains values that will stop the sticky on the th e.g. in the Browser Console for a standard list without any filtering or search turned on etc just a plain list if you add the sticky settings to the column th tags and remove the view-grid class from the div you will see the column headings go sticky. (I will leave it to you to find out what other values you need to override)

     

  • jwnz Profile Picture
    111 on at

    Hi @Fubar ,

     

    I guess I have got it working by uploading the below custom CSS:

    /*! sticky header */
    .entity-grid .view-grid {
     overflow: auto;
     height: 600px;
    }
    
    .entity-grid .view-grid th {
     top: 0;
     position: sticky;
     background-color: #FFFFFF;
     z-index: 1000;
    }

     

    How to upload CSS file:

    https://learn.microsoft.com/en-us/power-pages/getting-started/tutorial-add-custom-style

     

    Thanks

  • Fubar Profile Picture
    8,354 Super User 2025 Season 2 on at

    if 

    .entity-grid .view-grid

    is defined in one of the out of the box CSS files, then you may want to put !important at the end of each element inside that class (we have no control over the order that Web Files getting read in from the portals cache, so is possible the order changes with future updates etc so better to be safe than sorry)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard