I'm using Bootstrap and Angular to make a single-screen webpage that is designed to be shown on a small screen (such as the Adafruit 2.2" or 2.8" screen for the Raspberry Pi, or on a phone screen). I want to force all content (which is about 3-4 rows of a table) to expand up to, but not bigger than, the screen (so, absolutely no bigger than 100vh and 100vw and absolutely no scrolling or cut off text)
But for the life of me, I can't work it out. Here's a JSFiddle with what I'm trying to do (just bare bones without the Bootstrap / Angular stuff)
CSS:
#statusController {
background: #333;
height: 100vh !important;
min-height: 100vh !important;
max-height: 100vh !important;
}
td {
font-size: 100vh;
}
body,
html {
padding: 0;
margin: 0;
color: white;
height: 100vh !important;
min-height: 100vh !important;
max-height: 100vh !important;
}
HTML:
<div id="statusController">
<table>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
</table>
I've also tried using jQuery and Angular plugins like BigText, fitText, textFit and so forth, but with the same result -- the text is expanded and pushes down past the bottom of the page, so you need to scroll to see the rest.
Any clues?
EDIT: I've had a look at the duplicate answer, and my question differs, in that my question is more about the need to scroll, instead of how to expand text. I might need to try fiddling with the code sample provided, but as it stands, the text scaling still pushes text off the bottom when there's enough of it, which I don't want.