Yeah, vertical stuff in HTML/CSS is a pain. :c
Since you mentioned not being sure about the terminology,
cover would be a
class and the
class="" part of
<body class="cover"> is called an
attribute, while
<body> itself is what's called a
tag. c:
I don't know Twine, so I don't know if it's specific to that, but I do know HTML/CSS and using a transparent image feels weird to me. I'm guessing that's what you're using as the clickable element for your link? You should be able to simplify that by removing the image and using CSS to turn the link into a block that spans the entirely of the page both horizontally and vertically instead.
This worked for me (I had to use
height rather than
min-height in
<html> and
<body>):
<!DOCTYPE html>
<html>
<head>
<style>
html { height: 100%; }
body.cover {
margin: 0; padding: 0; // To make the link start from the very corner.
height: 100%;
}
a.coverlink {
display: block;
width: 100%;
height: 100%;
}
</style>
</head>
<body class="cover">
<a href="#" class="coverlink"></a>
</body>
</html>
If you intend for your game to be playable with a screen reader you might want to make the link accessible by adding a text that shows up when focusing the link:
<a href="#" class="coverlink" title="Start the game!"></a>
Your solution seems to be working, of course, so you don't have to listen to me if you just want to get on with your game, but just throwing this out there.