Ciao a tutti,
ho il seguente problema: una tabella con l intestazione fissa e il corpo che scrolla.
Il problema è che mi funziona su mozilla ed explorer 6 meno che in explorer 7 .
Ho cercato in rete ma tutti hanno il mio problema e nessuno lo risolve.
Grazie in anticipo
codice:
<div class="scrollTableContainer" id="lista">
<table id="scrollTable" cellspacing="2" cellpaddign="1" border="0" >
<thead class="fixedContent" >
<tr class="alternateColorTableRow1">
<td>Codice Utente</td>
<td>Cognome</td>
<td>Nome</td>
<td>Numero Telefonico 1</td>
<td>e-mail</td>
<td>FAX</td>
<td></td>
</tr>
</thead>
<tbody>
<c:forEach items="${requestScope.record}" var="rs">
<tr class="alternateColorTableRow0" >
<td>${rs.codiceUtente}</td>
<td>${rs.cognome}</td>
<td>${rs.nome}</td>
<td>${rs.numeroTelefonico001}</td>
<td>${rs.indirizzoEmail}</td>
<td>${rs.fax}</td>
<td><input type="button" value="Visualizza"
onclick="edit('vis','utenti','utenti', 'codiceUtente=${rs.codiceUtente}');"></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
Il mio css
codice:
div.scrollTableContainer {
position: relative;
width: 100%;
height:220px;
overflow: auto;
}
html> body div.scrollTableContainer {
overflow: hidden;
}
div.scrollTableContainer table{
width:100%;
color:#1F75AB;
}
html>/**/body div.scrollTableContainer #scrollTable>tbody {
overflow: auto;
/* height: 370px;*/
height:200px;
overflow-x: hidden;
}
/*per bloccare il thead in IE*/
div.scrollTableContainer thead tr {
position:relative;
top: expression(offsetParent.scrollTop);
}
/*per bloccare il thead in FF*/
thead.fixedContent tr {
position:relative;
top: expression(offsetParent.scrollTop);
}