[thelist] setting a small size for a div or span (example)
Tom Dell'Aringa
pixelmech at yahoo.com
Fri Jun 7 11:43:09 CDT 2002
Here is the page I am working on, not much to it. I wanted to make it like 8 x 8:
====================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script>
function clearIt()
{
for(x=0;x<=20;x++)
{
document.getElementById(x).style.backgroundColor = "green";
}
}
function foo(img)
{
clearIt();
setTimeout("x = 1" ,50);
for(x=0;x<=img;x++)
{
document.getElementById(x).style.backgroundColor = "red";
percent = ((x / 20) * 100)
oo = percent.toString();
zz = oo.substr(0, 3)
document.getElementById("p").innerHTML = zz;
}
}
for(i=0;i<=20;i++)
{
document.write("<span id='" + i+ "' onclick='foo(this.id)' style='line-height: 8px; margin: 0px;
padding: 0px; border: 0px none; background-color: green; width: 8; height: 8; cursor: hand; clip:
rect(8 8 8 8);'></span><img src='white.gif'>");
}
document.write(" <span id='p' style='color: silver; font-family: verdana; font-size: 12px;
font-style: italic'></span>")
//--></script>
</head>
<body>
</body>
</html>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
More information about the thelist
mailing list