Jump to content

Recommended Posts

HI I am trying to have a table with fixed header, and scrollable data cells below. on the right hand side of the table I would like a scroll bar to allow the data cells to scroll vertically.

This is the code I'm currently trying (without success)

.pb-scroll {
	display: 	 block;
	max-height:  400px;
	overflow:	 auto;
}

<tbody class="pb-scroll">
  <tr>
    <td>
      
      etc.

Any help greatly appreciated.

Phil

Link to post
Share on other sites

https://www.w3schools.com/code/tryit.asp?filename=G6A3A9X7PEY4

 

The problem is different browsers, different scrollbar widths, I tried this in three main browsers IE,Chrome, FF, and they are identical, if you find browser that causes misalignment because of scrollbar I suggest you re-enable 

.table-header {/*overflow-y:scroll;*/}

This will created scrollbar in header, even not required but will Make ALL browsers correctly to column widths.  

Edited by dsonesuk
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...