Make screen width display work

main
Jeff Elkner 2 years ago
parent 18432ad46e
commit 8bf1248db6

@ -11,6 +11,12 @@ rel='stylesheet'>
@import url(css/elknernet.css); @import url(css/elknernet.css);
</style> </style>
<script> <script>
function reportScreenWidth() {
let screenWidthOutput = document.querySelector("#screenWidth");
screenWidthOutput.textContent = window.innerWidth;
}
window.onload = reportScreenWidth;
window.onresize = reportScreenWidth;
</script> </script>
</head> </head>
@ -269,7 +275,7 @@ LTSP: Moving into the Mainstream</a></li>
<strong> HTML </strong> Valid! </a> <strong> HTML </strong> Valid! </a>
<a href="http://jigsaw.w3.org/css-validator/validator?uri=https://elkner.net/?profile=css3"> <a href="http://jigsaw.w3.org/css-validator/validator?uri=https://elkner.net/?profile=css3">
<strong> CSS </strong> Valid! </a> <strong> CSS </strong> Valid! </a>
<span id="winDisplay">Window width: <span id="scWidth"></span></span> <span id="winDisplay">Screen width: <span id="screenWidth"></span></span>
</footer> </footer>
</body> </body>

Loading…
Cancel
Save