Entry
How do I get a scrollable TABLE?
Apr 14th, 2000 16:00
Martin Honnen,
With IE4+ and NN6 you can stuff your TABLE into a DIV with dimensions
set with css and additionally the css property
overflow: auto; /* scrollbars when necessary */
or
overflow: scroll; /* scrollbars always */
Example:
<HTML>
<HEAD>
<STYLE>
.js {
color: white;
background-color: orange;
}
</STYLE>
<SCRIPT>
</SCRIPT>
</HEAD>
<BODY>
<DIV STYLE="width: 200px; height: 100px;
overflow: auto;"
>
<TABLE BORDER="1">
<SCRIPT>
for (var i = 0; i < 40; i++)
document.write('<TR><TD CLASS="js">' + i +
': JavaScript.FAQTs.com<\/TD><\/TR>');
</SCRIPT>
</TABLE>
</DIV>
</BODY>
</HTML>