BladeLogan answered:
Both unfortunately
Well, this is not a big problem. Very briefly: horizontal fill-in can be done with CSS properties only, like
width: 100%
(just an example), in combination with
margin
and
padding
properties.
To fill in the browser window's height, JavaScript may be needed. You can use the property
window.innerHeight
:
https://developer.mozilla.org/en-US/docs/Web/API/Window/innerHeight[
^].
You can find complete samples of layouts precisely fitting in available browser window's size (which works, of course, only when this window is not extremely small), in two my applications published on CodeProject:
Tetris on Canvas[
^],
JavaScript Calculator[
^].
It's easy to run then and see how everything works: the layout functionality is well encapsulated and isolated from the rest of functionality; both applications can be executed locally in a browser and don't require service part or any HTTP server at all.
—SA