I would like to find the innerWidth
and innerHeight
of the screen via Javascript, and then place the values into the width and height variables of the body class in the style area (css) of HTML.
For example:
<style>
body { background-image: url("images/hello.jpg");
background-repeat: no-repeat; background-color: brown;
width: valueW; height: valueH;}
</style>
Where valueW
is the returned value of the pixels of the innerWidth
of the screen, and valueH
for innerHeight
.
The "px" pixels value would need to follow the returned number of course.
Is this possible?
Thanks for any input.