Hola, aqui tienes una de las tablas con la que tengo este problema. Puedes probar sustituyendo los datos que devuelve el DTO por otros que metas tu hasta que desbordes el height de 186 y veras que cuando aparece el scroll la cabecera y la tabla de datos se descuandran.
Código PHP:
<div id="Layer1" style="width:95%;">
<table width="100%" border="1" cellpadding="0" cellspacing="0"
bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC" >
<tr>
<td class="text2" width="10%" align="center">Fecha Cita</td>
<td class="text2" width="10%" align="center">Hora Cita</td>
<td class="text2" width="10%" align="center">Asiste</td>
<td class="text2" width="20%" align="center">Nombre Expediente</td>
<td class="text2" width="15%" align="center">Fecha Apertura</td>
<td class="text2" width="15%" align="center">Fecha Cierre</td>
<td class="text2" width="20%" align="center">Profesional</td>
</tr>
</table>
</div>
<div id="Layer2" style="width:95%; height:186; z-index:1; overflow-y:auto">
<table width="100%" border="1" cellpadding="0" cellspacing="0"
bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC" >
<logcresent name="citasForm" property="colCitas">
<logc:iterate id="colCitas" name="citasForm" property="colCitas" indexId="ctr">
<bean:define id="cita" name="colCitas" type="...dto.DTOCitas"/>
<tr>
<td class="text3" width="10%" align="center">
<bean:write name="colCitas" property="f_cit_fecha"/> </td>
<td class="text3" width="10%" align="center">
<bean:write name="colCitas" property="t_cit_hora"/> </td>
<td class="text3" width="10%" align="center">
<input type="checkbox" id="sel" <%= checked %> <%= disabled %> value="<%= cita.getC_cit_id() %>"
onclick="llenoValores(this.value);">
</td>
<td class="text3" width="20%" align="center">
<bean:write name="colCitas" property="t_exp_nombre"/> </td>
<td class="text3" width="15%" align="center">
<bean:write name="colCitas" property="f_exp_inicio"/> </td>
<td class="text3" width="15%" align="center">
<bean:write name="colCitas" property="f_exp_final"/> </td>
<td class="text3" width="20%" align="center">
<bean:write name="colCitas" property="nombreProfesional"/> </td>
</tr>
</logc:iterate>
</logcresent>
</table>
</div>