Mesa con cuña fija en el interior de la posición: bloque absoluto.

Tengo una table HTML envuelta por un bloque con position:absolute . Quiero hacer que la primera fila (con un th o td , o envuelta por thead ) se fije en la parte superior, y la otra mesa debe ser desplazable, sin altura fija.

He intentado esto, pero dentro de la position:absolute no funcionó:

https://jsfiddle.net/dPixie/byB9d/3/light/

 html, body{ margin:0; padding:0; height:100%; } section { position: relative; border: 1px solid #000; padding-top: 37px; background: #500; } section.positioned { position: absolute; top:100px; left:100px; width:800px; box-shadow: 0 0 15px #333; } .container { overflow-y: auto; height: 200px; } table { border-spacing: 0; width:100%; } td + td { border-left:1px solid #eee; } td, th { border-bottom:1px solid #eee; background: #ddd; color: #000; padding: 10px 25px; } th { height: 0; line-height: 0; padding-top: 0; padding-bottom: 0; color: transparent; border: none; white-space: nowrap; } th div{ position: absolute; background: transparent; color: #fff; padding: 9px 25px; top: 0; margin-left: -25px; line-height: normal; border-left: 1px solid #800; } th:first-child div{ border: none; } 
 
Table attribute name
Table attribute name
Value
Value
Description
Description
align left, center, right Not supported in HTML5. Deprecated in HTML 4.01. Specifies the alignment of a table according to surrounding text
bgcolor rgb(x,x,x), #xxxxxx, colorname Not supported in HTML5. Deprecated in HTML 4.01. Specifies the background color for a table
border 1,"" Specifies whether the table cells should have borders or not
cellpadding pixels Not supported in HTML5. Specifies the space between the cell wall and the cell content
cellspacing pixels Not supported in HTML5. Specifies the space between cells
frame void, above, below, hsides, lhs, rhs, vsides, box, border Not supported in HTML5. Specifies which parts of the outside borders that should be visible
rules none, groups, rows, cols, all Not supported in HTML5. Specifies which parts of the inside borders that should be visible
summary text Not supported in HTML5. Specifies a summary of the content of a table
width pixels, % Not supported in HTML5. Specifies the width of a table