Answers for "how to create a scrollable table in html"

0

how to make scrollable table in html

----- Horizontally scrollable -----
<!-- A responsive table will display a horizontal scroll bar if the screen is 
too small to display the full content.
To create a responsive table, 
add a container element with --> overflow-x:auto <!-- around the --> <table> :
  
  <div style="overflow-x:auto;">
  	<table>
    	...
  	</table>
  </div>
  
----- Vertically scrollable -----
  <!-- Just add the display:block to the thead > tr and tbody. 
  check the below example -->
  html>body tbody.scrollContent {
	display: block;
	overflow: auto;
}
<div>
  <table>
    <thead class="fixedHeader">
    </thead>
    <tbody class="scrollContent">
    </tbody>
  </table>
</div
Posted by: Guest on June-02-2021

Code answers related to "how to create a scrollable table in html"

Browse Popular Code Answers by Language