
previous

page 30
next
The Home Straight
Back to your index.html file as it was after Page 25.
You will need to add this code before the <script> tag:
<style>
body {
background-color:green;
}
div {
text-align:center;
}
img {
height:23vmin;
}
</style>
<body>
body {
background-color:green;
}
div {
text-align:center;
}
img {
height:23vmin;
}
</style>
<body>
Then replace the first for loop with this code:
var n=0;
for (var r=0; r<4; r++) {
document.write('<div>');
for (var c=0; c<4; c++) {
document.write(s1 + arr[n] + s2);
n++;
}
document.write('</div>');
}
And add this line to the very end of your file:
for (var r=0; r<4; r++) {
document.write('<div>');
for (var c=0; c<4; c++) {
document.write(s1 + arr[n] + s2);
n++;
}
document.write('</div>');
}
</body>
previous
next