I would like to create rowspan on my sticky header but can't get it work.
JsFiddle: http://jsfiddle.net/x62v5ea8/1/
What i need is to connect first and second td in 'Header 1'
Can someone help me with this problem ?
HTML
<div class="my-wrapper">
<div class="my-scroller">
<table class="myTable">
<thead>
<tr>
<th class="my-sticky-col">Header 1</th>
<th class="my-sticky-col2">Header 2</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
<th>14</th>
<th>15</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2" class="my-sticky-col">A</td>
<td class="my-sticky-col2"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="my-sticky-col"> </td>
<td class="my-sticky-col2"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="my-sticky-col">C</td>
<td class="my-sticky-col2"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
</div>
</div>
CSS
body {
font-size: 1em;
}
.myTable {
border: none;
border-right: solid 1px #DDEFEF;
border-collapse: collapse;
border-spacing: 0;
font: normal 13px Arial, sans-serif;
}
.myTable thead th {
background-color: #EEE;
border: none;
color: #336B6B;
padding: 10px;
text-align: left;
text-shadow: 1px 1px 1px #fff;
white-space: nowrap;
}
.myTable tbody td {
color: #333;
padding: 10px;
text-shadow: 1px 1px 1px #fff;
white-space: nowrap;
}
.myTable tbody td, .myTable thead th {
border: 1px solid #ccc;
}
.my-wrapper {
position: relative;
}
.my-scroller {
margin-left: 283px;
overflow-x: scroll;
overflow-y: visible;
padding-bottom: 5px;
width: 300px;
}
.myTable .my-sticky-col {
left: 0;
position: absolute;
top: auto;
width: 120px;
}
.myTable .my-sticky-col2 {
border-right: solid 1px #000;
left: 142px;
position: absolute;
width: 120px;
}
Your code is actually working correctly. You are not seeing the rowspan working because the absolute positioning that is used for the sticky header. I updated your JS Fiddle with a few tweeks so you can see what is going on. http://jsfiddle.net/x62v5ea8/2/
You can see in the HTML I commented out the cell that will used by the rowspan and added a .test class with a height and background color so you can see that the cell is now fully expanding. Alternatively you can remove the position: absolute and you see the same results but your header wont be sticky anymore.
Related
How can I make columns in two tables have the same width?
I tried applying the width property on the td element for each column and the property style = "table-layout: fixed; but as you can see, the boundaries of the columns do not match.
JSFiddle: https://jsfiddle.net/v2bxdygj/
Here is my sample which works to some extent:
table {
border: 1px solid grey;
border-collapse:collapse;
width: 100%;
table-layout:fixed;
}
td {
border: 1px solid grey;
padding-left: 5px;
padding-right: 5px;
white-space: nowrap;
}
td span {
white-space: nowrap;
}
.code {
width: 40px;
}
.name {
width: 548px;
}
.colspan {
width: 588px;
}
.col3, .col4, .col5 {
width: 10%;
}
<table>
<tr>
<td class="code"><button>Код</button></td>
<td class="name"><button>Название</button></td>
<td class="col3"> </td>
<td class="col4"> </td>
<td class="col5"> </td>
</tr>
<tr>
<td class="colspan" colspan="2"><input type="text"> <span>Фильтр по коду и названию...</span></td>
<td class="col3">Разрешено</td>
<td class="col4">Запрещено</td>
<td class="col5">Неопределено</td>
</tr>
</table>
<table>
<tr>
<td class="code">1</td>
<td class="name">Вход в систему</td>
<td class="col3"> </td>
<td class="col4"> </td>
<td class="col5"> </td>
</tr>
<tr>
<td>2</td>
<td>Редактирование, администрирование групп и пользователей</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>3</td>
<td>Создание или редактирование определения адресного элемента</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>4</td>
<td>Создание или редактирование записи адресного элемента</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
I'm making a table and I got a few problems that I can't solve without help,namely:
I need all <td> to be the same height as it's respective <tr>. height:100% doesn't work for all <td> for some reason, however fixed height works.
<tbody> is smaller than <table> itself which leads to the gap on the right side.
I want all borders to be 1px, but some of them are more bold. How do I make them all uniform?
https://codepen.io/NoOneKnowsWhoIam/pen/rzweRV
* {
box-sizing: border-box;
}
.caption {
background: yellow;
padding: 5px;
}
table {
border-collapse: collapse;
border: 1px solid black;
width: 400px;
display: block;
margin: 0 auto;
background: grey;
}
.quarter-width {
width: 25%;
}
.half-width {
width: 50%;
}
.third-width {
width: 33.33333333333333%;
}
td {
padding: 5px;
width: 100%;
height: 100%;
border: 1px solid black;
display: inline-block;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
<table>
<tbody>
<caption class="caption"><b>ST CLARE ZNNR5</b></caption>
<tr>
<td><b>11:39 01.07.2017</b></td>
</tr>
<tr>
<td class="half-width"><b>MMSI 235002514</b></td>
<td class="half-width text-right"><b>IMO 09236949</b></td>
</tr>
<tr>
<td>
<b>
Пассажирское судно, в пути<br>
86 м × 18 м × 2.5 м
</b>
</td>
</tr>
<tr>
<td class="half-width">
Координаты<br>
<b>50 47. 2000 N</b><br>
<b>001 06. 4000 W</b>
</td>
<td class="half-width text-right">
Время с момента получения отчета<br>
<b>9 с</b>
</td>
</tr>
<tr>
<td class="half-width">
Пункт назначения<br>
<b>Port Fish</b>
</td>
<td class=" fixim half-width text-right">
Расчетное время прибытия<br>
<b>
2017-07-01 17:15
<b>(UTC)</b>
</b>
</td>
</tr>
<tr class="text-center">
<td class="quarter-width">
COG<br>
<b>329°</b>
</td>
<td class="quarter-width">
COG<br>
<b>329°</b>
</td>
<td class="quarter-width">
HDG<br>
<b>323°</b>
</td>
<td class="quarter-width">
LOG<br>
<b>_</b>
</td>
</tr>
<tr>
<td><b>Спланированный маршрут</b></td>
</tr>
<tr>
<td class="third-width"><b>ПТ №1</b></td>
<td class="third-width">
Tдв<br>
<b>12:57:19</b>
</td>
<td class="third-width">
D<br>
<b>40.162 миль</b>
</td>
</tr>
<tr>
<td>Рассчитать маршрут</td>
</tr>
</tbody>
</table>
Delete display: inline-block; from the rule for td - this cancels their table-cell property, causing the problems you describe:
* {
box-sizing: border-box;
}
.caption {
background: yellow;
padding: 5px;
}
table {
border-collapse: collapse;
border: 1px solid black;
width: 400px;
display: block;
margin: 0 auto;
background: grey;
}
.quarter-width {
width: 25%;
}
.half-width {
width: 50%;
}
.third-width {
width: 33.33333333333333%;
}
td {
padding: 5px;
width: 100%;
height: 100%;
border: 1px solid black;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
<table>
<tbody>
<caption class="caption"><b>ST CLARE ZNNR5</b></caption>
<tr>
<td><b>11:39 01.07.2017</b></td>
</tr>
<tr>
<td class="half-width"><b>MMSI 235002514</b></td>
<td class="half-width text-right"><b>IMO 09236949</b></td>
</tr>
<tr>
<td>
<b>
Пассажирское судно, в пути<br>
86 м × 18 м × 2.5 м
</b>
</td>
</tr>
<tr>
<td class="half-width">
Координаты<br>
<b>50 47. 2000 N</b><br>
<b>001 06. 4000 W</b>
</td>
<td class="half-width text-right">
Время с момента получения отчета<br>
<b>9 с</b>
</td>
</tr>
<tr>
<td class="half-width">
Пункт назначения<br>
<b>Port Fish</b>
</td>
<td class=" fixim half-width text-right">
Расчетное время прибытия<br>
<b>
2017-07-01 17:15
<b>(UTC)</b>
</b>
</td>
</tr>
<tr class="text-center">
<td class="quarter-width">
COG<br>
<b>329°</b>
</td>
<td class="quarter-width">
COG<br>
<b>329°</b>
</td>
<td class="quarter-width">
HDG<br>
<b>323°</b>
</td>
<td class="quarter-width">
LOG<br>
<b>_</b>
</td>
</tr>
<tr>
<td><b>Спланированный маршрут</b></td>
</tr>
<tr>
<td class="third-width"><b>ПТ №1</b></td>
<td class="third-width">
Tдв<br>
<b>12:57:19</b>
</td>
<td class="third-width">
D<br>
<b>40.162 миль</b>
</td>
</tr>
<tr>
<td>Рассчитать маршрут</td>
</tr>
</tbody>
</table>
I created a table and in that table I also want scroll and want to fixed headers when scroll is display.
I also used position:fixed but this does not work. In fact, when I add this then all headers come in one position.
This is what I have tried. Check this code please:
.GridviewScrollHeader TH, .GridviewScrollHeader TD
{
padding: 5px;
font-weight: bold;
white-space: nowrap;
border-right: 1px solid #AAAAAA;
border-bottom: 1px solid #AAAAAA;
background-color: #EFEFEF;
text-align: left;
vertical-align: bottom;
}
.GridviewScrollItem TD
{
padding: 5px;
white-space: nowrap;
border-right: 1px solid #AAAAAA;
border-bottom: 1px solid #AAAAAA;
background-color: #FFFFFF;
}
.GridviewScrollPager
{
border-top: 1px solid #AAAAAA;
background-color: #FFFFFF;
}
.GridviewScrollPager TD
{
padding-top: 3px;
font-size: 14px;
padding-left: 5px;
padding-right: 5px;
}
.GridviewScrollPager A
{
color: #666666;
}
.GridviewScrollPager SPAN
{
font-size: 16px;
font-weight: bold;
}
.inner_table {
width: 100%;
border-collapse: collapse;
overflow: auto;
height: 300px;
}
#pagination a {
display:inline-block;
margin-right:5px;
}
<table ID="tabledata" class="inner_table GridviewScrollPager">
<thead>
<tr class="GridviewScrollHeader GridviewScrollItem">
<th>
Name
</th>
<th>
Class
</th>
</tr>
</thead>
<tbody>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td >
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
Roh
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
ABC
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
DEF
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
EFG
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
</tbody>
</table>
So how should I fix the headers and add scroll?
Any solution for this question please.
tr {
width: 100%;
display: inline-table;
table-layout: fixed;
}
table {
display: -moz-groupbox; // Firefox Bad Effect
}
tbody {
overflow-y: scroll;
height: 250px; // <-- Select the height of the body
width: 100%;
position: absolute;
}
.GridviewScrollHeader TH,
.GridviewScrollHeader TD {
padding: 5px;
font-weight: bold;
white-space: nowrap;
border-right: 1px solid #AAAAAA;
border-bottom: 1px solid #AAAAAA;
background-color: #EFEFEF;
text-align: left;
vertical-align: bottom;
}
.GridviewScrollItem TD {
padding: 5px;
white-space: nowrap;
border-right: 1px solid #AAAAAA;
border-bottom: 1px solid #AAAAAA;
background-color: #FFFFFF;
}
.GridviewScrollPager {
border-top: 1px solid #AAAAAA;
background-color: #FFFFFF;
}
.GridviewScrollPager TD {
padding-top: 3px;
font-size: 14px;
padding-left: 5px;
padding-right: 5px;
}
.GridviewScrollPager A {
color: #666666;
}
.GridviewScrollPager SPAN {
font-size: 16px;
font-weight: bold;
}
.inner_table {
width: 98.4%;
border-collapse: collapse;
overflow: auto;
}
#pagination a {
display: inline-block;
margin-right: 45px;
}
<table ID="tabledata" class="inner_table GridviewScrollPager">
<thead>
<tr class="GridviewScrollHeader GridviewScrollItem">
<th>
Name
</th>
<th>
Class
</th>
</tr>
</thead>
<tbody>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
Roh
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
ABC
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
DEF
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
EFG
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
<tr class="GridviewScrollItem">
<td>
John
</td>
<td>
12
</td>
</tr>
</tbody>
</table>
I have a table where I load dynamic content, and I want that the content inside the cells is the same height as the cells! Precisely I have "a" elements with some text, inside the td cells. I get a problem when the text in a cell is long and goes at newline, and like you can see in the image the other "a" elements in the table row don't fit the full height of the cell.
See the live Demo
Here is the code
HTML
<table class="table" cellspacing="0">
<thead>
<tr>
<th>Data</th>
<th>Titolo</th>
<th>Sede</th>
<th>Città</th>
</tr>
</thead>
<tbody>
<tr>
<td>12/02/2015
</td>
<td><span class="fixed glyphicon glyphicon-flag"></span>asd
</td>
<td>ada
</td>
<td>asdas
</td>
</tr>
<tr>
<td>04/02/2015
</td>
<td><span class="fixed glyphicon glyphicon-flag"></span>ada
</td>
<td>prova
</td>
<td>asda
</td>
</tr>
<tr>
<td>07/09/2017
</td>
<td><a href="eventi.php?id=12">Evento Lignano <br>
sabbiadoro</a>
</td>
<td>Palazzetto dello Sport
</td>
<td>Perugia
</td>
</tr>
<tr>
<td>09/09/2015
</td>
<td>aaa
</td>
<td>aaa
</td>
<td>aaa
</td>
</tr>
<tr>
<td>09/03/2015
</td>
<td>sfsd
</td>
<td>ada
</td>
<td>dadasd
</td>
</tr>
</tbody>
CSS
table{
width:400px;
}
td a{
background:#ff0;
display: block;
padding:20px;
box-sizing:border-box;
height: 100%;
width: 100%;
}
td{
height:100%;
position: relative;
}
table {
width: 400px;
}
td a {
background: #ff0;
display: block;
padding: 20px;
box-sizing: border-box;
height: 100%;
width: 100%;
}
td {
height: 100%;
position: relative;
}
<table class="table" cellspacing="0">
<thead>
<tr>
<th>Data</th>
<th>Titolo</th>
<th>Sede</th>
<th>Città</th>
</tr>
</thead>
<tbody>
<tr>
<td>12/02/2015
</td>
<td><span class="fixed glyphicon glyphicon-flag"></span>asd
</td>
<td>ada
</td>
<td>asdas
</td>
</tr>
<tr>
<td>04/02/2015
</td>
<td><span class="fixed glyphicon glyphicon-flag"></span>ada
</td>
<td>prova
</td>
<td>asda
</td>
</tr>
<tr>
<td>07/09/2017
</td>
<td><a href="eventi.php?id=12">Evento Lignano <br>
sabbiadoro</a>
</td>
<td>Palazzetto dello Sport
</td>
<td>Perugia
</td>
</tr>
<tr>
<td>09/09/2015
</td>
<td>aaa
</td>
<td>aaa
</td>
<td>aaa
</td>
</tr>
<tr>
<td>09/03/2015
</td>
<td>sfsd
</td>
<td>ada
</td>
<td>dadasd
</td>
</tr>
</tbody>
</table>
Here is a little hack I've used in the past.
You can essentially add a pseudo element to the a element and absolutely position it relative to the closest td element. Since the pseudo elements are essentially children elements of the a element, when you click the pseudo element, you are inadvertently clicking the a element.
Updated Example
td a:after, td a:before {
content: '';
position: absolute;
top: 0; right: 0;
bottom: 0; left: 0;
}
td a:after {
background: #ff0;
z-index: -1;
}
You must define an height of your TD, otherwise the browser doesn't know the 100% of what is to be considered:
td {
height:100px;
position: relative;
}
https://jsfiddle.net/wg6paumw/4/
How can the code below be modified such that the Table THead matches up with the TD's and also respect the size (width) of the table? What is happening now is that the table headers expand beyond the size of the div and the table horizontally accross the page.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<style type="text/css">
/*------------------------------------------------------------------
Table Style
------------------------------------------------------------------ */
table a:link {
color: #666;
font-weight: bold;
text-decoration:none;
}
table a:visited {
color: #999999;
font-weight:bold;
text-decoration:none;
}
table a:active,
table a:hover {
color: #bd5a35;
text-decoration:underline;
}
table {
font-family:Arial, Helvetica, sans-serif;
color:#666;
font-size:12px;
background:#eaebec;
border-radius:3px;
border-collapse:collapse; border-spacing: 0;
box-shadow: 0 1px 2px #d1d1d1;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
table-layout: fixed;
}
table th {
border-bottom:1px solid #ccc;
border-left: 1px solid #ccc;
background: #ededed;
}
table tr {
text-align: center;
}
table td {
border-bottom:1px solid #ccc;
border-left: 1px solid #ccc;
background: #fafafa;
text-align: left;
}
table tr:hover td {
background: #f2f2f2;
}
table th, table td {
height: 20px;
width: 200px;
}
#container {
width : 98.7%;
height: 300px;
overflow-x: scroll;
overflow-y: scroll;
}
table tr td:first-child, table tr th:first-child {
border-left: 0;
}
table thead {
_position: fixed;
_position: relative;
_position: absolute;
}
TABLE THEAD TR TH {
top:expression(this.offsetParent.scrollTop);
border-top:1px solid #ccc;
_position:relative;
_position: absolute;
_position: fixed;
}
table tr:first-child td {
border-top: 0;
}
</style>
</head>
<body>
<div id="container">
<table id="data">
<!-- Table Header -->
<thead>
<tr>
<th>File Number</th>
<th> </th>
<th> </th>
<th>Firstname</th>
<th>Lastname</th>
<th>Progress</th>
<th>Vital Task</th>
</tr>
</thead>
<!-- Table Header -->
<!-- Table Body -->
<tbody>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>100%</td>
<td>Yes</td>
</tr><!-- Table Row -->
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>100%</td>
<td>Yes</td>
</tr><!-- Darker Table Row -->
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>20%</td>
<td>No</td>
</tr>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>80%</td>
<td>No</td>
</tr>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>100%</td>
<td>Yes</td>
</tr>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>23%</td>
<td>yes</td>
</tr>
<tr>
<td>ABC-123-123456</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>80%</td>
<td>No</td>
</tr>
<tr>
<td>Hyperlink Example</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>80%</td>
<td>Another</td>
</tr>
</tbody>
<!-- Table Body -->
</table>
<script>
$(function() {
$( "#data tr th" ).resizable({
handles: 'e'
});
});
</script>
</div>
</body>
</html>
ETA http://jsfiddle.net/KrB79/
Fix the container's CSS Coding to:
#container {
width : 98.7%;
height: 300px;
overflow-x: scroll;
overflow-y: scroll;
position: fixed;
}
Problem solved with IE7.