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
Hitesh chaudhariHitesh chaudhari 

Horizontal Scrollbar only applies to first column

  • I want to apply horizontal scrollbar to my table which should have fixed header . 
  • I tried with overflow:auto. css property  but it applies to only first coloumn which is list of checkbox in my case , I want that scrollbar should apply to all rows/table so that users can sroll records .
  • I am using <apex:repeat> to print table values. 

Following is the code I am refering :
 
<apex:outputPanel id="refreshServerTable">
                <center>
                    <apex:outputPanel id="serverOutputPanel" title="Table Details using HTML table" layout="block">
                              <div id= "table-scroll">
								  <table width='95%' id="tablestylecss">
										<tr>
											<th><INPUT type="checkbox" id="mainChkBox"  onclick="checkAllCheckbox();" oncomplete="chkBoxes();" /> </th>
											<th>Header 1</th>
											<th>Header 2</th>
											<th>Header 3</th>
											<th>Header 4</th>
											<th>Header 5</th>
										</tr>
									  <tbody id="tableDatatable1"  >
											<apex:repeat id="myTable" value="{!Values}" var="s">
												<tr>
													<td><input type="checkbox" name="sName" id="serverCheckbox" onclick="checkrecord(this)" value="{!record.id}/></td>
													<td>Custom Field 1</td>
													<td>Custom Field 2</td>
													<td>Custom Field 3</td>
													<td>Custom Field 4</td>
													<td>Custom Field 5</td>
													  </tr>
											</apex:repeat>
										</tbody>
								   </table>
                              </div>
                    </apex:outputPanel>
				</center>	
</apex:outputPanel>