Norbert Klein: Scrollbalken mit OVERFLOW:AUTO

Beitrag lesen

hallo zusammen

Immer doch.

wie kann ich mit CSS erreichen, dass wenn ich mehrere datensätze habe, dass der scrollbalken automatisch nach unten scrollt ??

Gar nicht, CSS kann das AFAIK nich, aber mit JavaScript geht's:

<body onload="window.location.hash = '#unten'">

<span id="Layer1" style="BACKGROUND-COLOR: #adadad; position:relative; width:100%; height:290px; overflow:auto; z-index:1; left: 0px">
<table width="100%" cellspacing="1" cellpadding="1" border="0" bgcolor="#000000">
<tr>
<td nowrap class="SansSerif8"> </td>
<td width="2%" class="SansSerif8"><b>M</b></td>
<td width="14%" nowrap class="SansSerif8"><b>Von</b></td>
<td width="14%" nowrap class="SansSerif8"><b>Bis</b></td>
<td width="14%" nowrap class="SansSerif8"><b>Stichtag</b></td>
<td width="14%" nowrap class="SansSerif8"><b>Text</b></td>
<td width="14%" nowrap class="SansSerif8"><b>BeschGrad</b></td>
<td width="14%" nowrap class="SansSerif8"><b>AHV-Lohn</b></td>
<td width="14%" nowrap class="SansSerif8"><b>PK-Lohn</b></td>
</tr>
<tr bgcolor="#FFFFFF">
<td nowrap class="SansSerif8" bgcolor="#d3d3d3"> </td>
<td nowrap class="SansSerif8">TR</td>
<td width="14%" nowrap class="SansSerif8">31.12.1994</td>
<td width="14%" nowrap class="SansSerif8">31.12.1994</td>
<td width="14%" nowrap class="SansSerif8"></td>
<td width="16%" nowrap class="SansSerif8">Datenübernahme</td>
<td width="14%" nowrap class="SansSerif8">100.00%</td>
<td width="14%" nowrap class="SansSerif8">0.00</td>
<td width="14%" nowrap class="SansSerif8">0.00</td>
</tr>

<tr><td colspan="9" bgcolor="#ffffff">
<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.
<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.
<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.<br>.

<a name="unten"></a> <-- Das muss in der untersten Tabellenzeile stehn

</td></tr>

</span>
</table>

Gruß
Norbert