shlagish
06-07-2003, 09:42 PM
Hi, here's the relevant part of my script:
<html>
<head>
<style type="text/css">
<!--
body { margin: 0px 0px 0px 0px; padding: 0px; }
p { margin-left: 10px; }
-->
</style>
<script type="text/javascript">
<!--
function MovePic()
{
img.style.posRight = Math.floor(img.style.posRight)
img.style.posTop = Math.floor(img.style.posTop)
if(img.style.posRight != 10 )
{
img.style.posRight -= 1
}
else if(img.style.posTop != 10 )
{
img.style.posTop -= 1
}
else
{
clearTimeout(PicTimer)
}
}
PicTimer=setInterval("MovePic();" , 1)
-->
</script>
</head>
<body>
<img id="img" src="oct18th.jpg" width="27.777777777777777%" height="15%" alt="picture of band" border="0px" style="position: absolute; margin: 0px 0px 0px 0px; right: 127.777777777777777%; top: 3.472222222222222222222222222%;">
</body>
</html>
Well, problem is: It doesn't work.
The image goes to the right fine, it stops at the right place. Then, it starts going upwards (which is good), but it doesn't stop at 10px... It just keeps going forever...
Can you see the problem here?
Second question:
Here is the relevant part of the code:
------>index.html<---------
<html>
<center>
<iframe frameborder="0" width="22.13541666666666666%" height="100%" src="links.html" name="links" scrolling="no"></iframe>
<iframe frameborder="0" width="70.3125%" height="100%" src="main.html" name="main" scrolling="auto"></iframe>
</center>
</html>
----------->links.html<-------------
<html>
<head>
<base target="main" />
<style type="text/css">
<!--
body { margin: 0px 0px 0px 0px; padding: 0px; }
img { z-index: -1; border: 0px; position: absolute; left: 0px; margin: 0px 0px 0px 0px; }
img.1 { position: absolute; top: 3.472222222222222222222222222%; }
img.2 { position: absolute; top: 20.78703703703703703703703703%; }
img.3 { position: absolute; top: 38.10185185185185185185185185%; }
img.4 { position: absolute; top: 55.41666666666666666666666666%; }
img.5 { position: absolute; top: 72.73148148148148148148148148%; }
-->
</style>
</head>
<body>
<a href="Oct18th.html" title="OCTOBER 18th">
<img class="1" src="oct18th.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
<a href="Nov15th.html" title="NOVEMBER 15th">
<img class="2" src="nov15th.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
<a href="Jan17th.html" title="JANUARY 17th">
<img class="3" src="jan17th.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
<a href="Feb21st.html" title="FEBRUARY 21st">
<img class="4" src="feb21st.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
<a href="Mar20th.html" title="MARCH 20th">
<img class="5" src="mar20th.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
</body>
</html>
--------->main.html<------------
nothing interesting
When I click on Octobre 18th 2003, it opens "Oct18th.html" in the frame named "main"
------------->Oct18th.html>-------------
<html>
<head>
<style type="text/css">
<!--
body { margin: 0px 0px 0px 0px; padding: 0px; }
p { margin-left: 10px; }
-->
</style>
</head>
<body>
<img id="img" src="oct18th.jpg" width="27.777777777777%" height="15%" alt="picture of band" border="0px" style="position: absolute; margin: 0px 0px 0px 0px; left: 0px; top: 3.472222222222222222222222222%;">
</body>
</html>
The image (oct18th.jpg) is in both links.html AND Oct18th.html.
Both images have position: absolute. I set both their heights to the same value (top: 3.472222222222222222222222222%)
But, when I look at them, I see a difference in height?????
Can anyone explain this?
If you see any other problem in my codes, scripts, styles, whatever, don't hesitate to tell me.
Sorry my post was so long, I really appreciate the help :)
<html>
<head>
<style type="text/css">
<!--
body { margin: 0px 0px 0px 0px; padding: 0px; }
p { margin-left: 10px; }
-->
</style>
<script type="text/javascript">
<!--
function MovePic()
{
img.style.posRight = Math.floor(img.style.posRight)
img.style.posTop = Math.floor(img.style.posTop)
if(img.style.posRight != 10 )
{
img.style.posRight -= 1
}
else if(img.style.posTop != 10 )
{
img.style.posTop -= 1
}
else
{
clearTimeout(PicTimer)
}
}
PicTimer=setInterval("MovePic();" , 1)
-->
</script>
</head>
<body>
<img id="img" src="oct18th.jpg" width="27.777777777777777%" height="15%" alt="picture of band" border="0px" style="position: absolute; margin: 0px 0px 0px 0px; right: 127.777777777777777%; top: 3.472222222222222222222222222%;">
</body>
</html>
Well, problem is: It doesn't work.
The image goes to the right fine, it stops at the right place. Then, it starts going upwards (which is good), but it doesn't stop at 10px... It just keeps going forever...
Can you see the problem here?
Second question:
Here is the relevant part of the code:
------>index.html<---------
<html>
<center>
<iframe frameborder="0" width="22.13541666666666666%" height="100%" src="links.html" name="links" scrolling="no"></iframe>
<iframe frameborder="0" width="70.3125%" height="100%" src="main.html" name="main" scrolling="auto"></iframe>
</center>
</html>
----------->links.html<-------------
<html>
<head>
<base target="main" />
<style type="text/css">
<!--
body { margin: 0px 0px 0px 0px; padding: 0px; }
img { z-index: -1; border: 0px; position: absolute; left: 0px; margin: 0px 0px 0px 0px; }
img.1 { position: absolute; top: 3.472222222222222222222222222%; }
img.2 { position: absolute; top: 20.78703703703703703703703703%; }
img.3 { position: absolute; top: 38.10185185185185185185185185%; }
img.4 { position: absolute; top: 55.41666666666666666666666666%; }
img.5 { position: absolute; top: 72.73148148148148148148148148%; }
-->
</style>
</head>
<body>
<a href="Oct18th.html" title="OCTOBER 18th">
<img class="1" src="oct18th.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
<a href="Nov15th.html" title="NOVEMBER 15th">
<img class="2" src="nov15th.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
<a href="Jan17th.html" title="JANUARY 17th">
<img class="3" src="jan17th.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
<a href="Feb21st.html" title="FEBRUARY 21st">
<img class="4" src="feb21st.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
<a href="Mar20th.html" title="MARCH 20th">
<img class="5" src="mar20th.jpg" border="0px" width="100%" height="15%" alt="picture of band" />
</a>
</body>
</html>
--------->main.html<------------
nothing interesting
When I click on Octobre 18th 2003, it opens "Oct18th.html" in the frame named "main"
------------->Oct18th.html>-------------
<html>
<head>
<style type="text/css">
<!--
body { margin: 0px 0px 0px 0px; padding: 0px; }
p { margin-left: 10px; }
-->
</style>
</head>
<body>
<img id="img" src="oct18th.jpg" width="27.777777777777%" height="15%" alt="picture of band" border="0px" style="position: absolute; margin: 0px 0px 0px 0px; left: 0px; top: 3.472222222222222222222222222%;">
</body>
</html>
The image (oct18th.jpg) is in both links.html AND Oct18th.html.
Both images have position: absolute. I set both their heights to the same value (top: 3.472222222222222222222222222%)
But, when I look at them, I see a difference in height?????
Can anyone explain this?
If you see any other problem in my codes, scripts, styles, whatever, don't hesitate to tell me.
Sorry my post was so long, I really appreciate the help :)