I have an HTML document with a very long list, like this:
<ol>
<li>frog</li>
<li>fish</li>
<li>flamingo</li>
<li>ferret</li>
<li><div class="marked">fox</div></li>
...
</ol>
The list is too long for all items to be visible on the screen. I've marked one item with div class="marked">
and </div>
. Is there some way to vertically center the list on that marked item.
- If the list is too long, it should run off the edge of the visible screen, with no scrollbars created.
Here is an example of how it appears in the browser window:
__________________
| 2.fish |
| 3.flamingo |
| 4.ferret | <-- This marked item is centered.
| 5.elephant |
|___6.mouse________| <-- No scrollbars.
How can I vertically align a list on a marketed item?