JavaScript html css tr set width html width percent,html width and height,html width auto,

I have the HTML table & its CSS.

CSS :

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

HTML :

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

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 ?

Answer:1

NEVER try to use absolute or even relative re-positioning on <tr>, <td> and <th>. It's not supposed to work in tables, and in most cases the results will be nowhere near what you'd expect.

Answer:2

My script doesn't work in Wordpress. I'm trying to convert my HTML page into a Wordpress Theme.. Ive got the CSS linked.. <link type="text/css" rel="stylesheet" href="<?php bloginfo('...

My script doesn't work in Wordpress. I'm trying to convert my HTML page into a Wordpress Theme.. Ive got the CSS linked.. <link type="text/css" rel="stylesheet" href="<?php bloginfo('...

  1. link script in wordpress

Orchestrate has a client for NodeJS. It is based on promises so I should define a function then and a function fail. The first should be triggered when the request is successful and the second one ...

Orchestrate has a client for NodeJS. It is based on promises so I should define a function then and a function fail. The first should be triggered when the request is successful and the second one ...

I'm working on an EM to PX converter. Basically you paste in your code in the "PX" textarea, and then the same code will appear in the "EM" textarea with em values. It kinda works, but doesn't ...

I'm working on an EM to PX converter. Basically you paste in your code in the "PX" textarea, and then the same code will appear in the "EM" textarea with em values. It kinda works, but doesn't ...

  1. regexp g flag
  2. regex g flag
  3. regex g flag javascript
  4. javascript regexp g flag
  5. js regexp g flag

How to append &nbsp; to the end of the last tag with jQuery? For example, my html would be something like this: <div> <p>line1</p> <p>line2</p> </div&...

How to append &nbsp; to the end of the last tag with jQuery? For example, my html would be something like this: <div> <p>line1</p> <p>line2</p> </div&...

  1. append python
  2. append definition
  3. append to list python
  4. append meaning
  5. append to dictionary python
  6. append dataframe pandas
  7. append to numpy array
  8. append to string python
  9. append to array javascript
  10. append javascript
  11. append to array python
  12. append jquery
  13. append to file python
  14. append in r
  15. append row to dataframe
  16. append two dataframes pandas
  17. append to list r
  18. append matlab
  19. append to tuple python
  20. append query access