html css tr set width

I have the HTML table & its CSS.


#outerDIV {
  position: relative;
  padding-top: 20px;
#innerDIV {
  overflow-y: auto;
  height: 500px;
table#mytable tbody tr:first-child 
    position :absolute;


<div class="outerDIV">
  <div class="innerDIV">
    <table id="#mytable"></table>

I need the fixed header tags of table, so is the above code does, but the width of the th tags gets compressed to the left & does not matches the width of the tr's of the body. How to make the tr to 100% width ?

Source: jquery

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.