HTML responsive html formatting

I’m creating a html program to display grafana iframes because with sitemap it is not possible to move in time. I have the first setup working and test this inside VSC for the different screen formats.

http://127.0.0.1:5500/html/myhtmlcode/index.html

If I run the same code with openhab

http://192.168.100.50:8080/static/myhtmlcode/index.html

I get a different layout. Can somebody explain this and give me a way to solve this? I need openhab because I also want to access items inside openhab.

Is it possible that this file structure is not working
image
I include je css en js file as follows

  <link rel="stylesheet" href="css/index.css">
  <script src="js/script.js"></script>

Not sure why but the script.js file is not processed. The file index.css is working. I found that a change to the file structure is solving the issue but I don’t understand why

  <link rel="stylesheet" href="css/index.css">
  <script src="script.js"></script>

The only way I can the script working is to put it in the html file. Why is this not working in a separate file?

Most likely you are running into issues with the new content security policy which has been updated specifically for better security around importing scripts. When you find that the script is not loading, check the browser console, you will probably see a CSP warning.

Keeping the script in-line in the html file is a fine solution.

Thanks