Доброго времени суток!
Есть у меня табличка. В ней надо зафиксировать заголовки (т.е. чтобы заголовки при скроллинге оставались на месте, а скроллировался только контент таблицы).
Вот как я это делаю:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<div style="border: 1px solid #963; height: 100px;
overflow: auto;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<thead>
<tr style="
position: relative;">
<th style="background: blue;">Some header 1</th>
<th style="background: blue;">Some header 2</th>
<th style="background: blue;">Some header 3</th>
<th style="background: blue;">Some header 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>Some content</td>
<td>Some content</td>
<td>Some content</td>
<td>Some content</td>
</tr>
...
</tbody>
</table>
</div>
</html>
И фиксирования не происходит. Но если выбросить первую строчку, то все норм...
Подскажите в чем фишка?