function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AmitSinhaAmitSinha 

Floating Header in the a Visual force page

Hello, 

 

I am trying to make the header row static on the VF page, such that when the users scroll down the page the first row remains there and users are able to see the row data along with the Column headers (just like it happens in Excel when the top panes are frozen).

 

Can someone provide any pointers ? 

 

Thanks

Amit

Best Answer chosen by Admin (Salesforce Developers) 
Val ValinoVal Valino

I used jQuery and followed this to accomplish the same thing.

 

http://ruturaj.net/automatic-header-stick-to-scroll-with-jquery/

All Answers

Val ValinoVal Valino

I used jQuery and followed this to accomplish the same thing.

 

http://ruturaj.net/automatic-header-stick-to-scroll-with-jquery/

This was selected as the best answer
Anil SavaliyaAnil Savaliya

<apex:page >
<style>
#testcss{
position: fixed;
width:100%
}
</style>
<div id='testcss'>
<apex:pageBlock >
<apex:pageBlockSection title="test">
</apex:pageBlockSection>
</apex:pageBlock>
</div>
</apex:page>

AmitSinhaAmitSinha

Thanks Val, i followed the solution you pointed to, it worked like a charm.