I am trying to create a single page, scrolling site with an array of images and corresponding captions. I would like to fix the captions to the bottom of the page. I imagine the solution will involve assigning an id to each image that will trigger a hide/show event when it comes within a certain distance from the top of the window. In this example, each caption is written within the table that houses the image it corresponds too. I am using tables to display the images because I have not found a suitable way to responsively center the images vertically and horizontally on the page; this is a separate issue I am working on.
Here is the relevant code:
<html>
<body>
<a id="1">
<table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%">
<tr valign="middle"><td align="center" colspan="2">
<img src="31.jpg" width="40%" style="padding-top:30px; max-width:672px">
</td></tr>
<tr valign="bottom"><td style="padding:0 0 12 12" height="30">
Cover for a book of photographs
</td><td align="right" style="padding:0 12 12 0">
<a href="#27" style="padding-right:12px">Up</a><a href="#2">Down</a>
</td></tr>
</table>
</a>
<a id="2">
<table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%">
<tr valign="middle"><td align="center" colspan="2">
<img src="22-2.jpg" width="75%" style="padding-top:30px; max-width:1260px">
</td></tr>
<tr valign="bottom"><td style="padding:0 0 12 12" height="30">
Title and double-page spread for a book of photographs
</td><td align="right" style="padding:0 12 12 0">
<a href="#1" style="padding-right:12px">Up</a><a href="#3">Down</a>
</td></tr>
</table>
</a>
...
</body>
</html>