my website width 100% didnt work in javascript

If you want to set your website width to 100% using JavaScript, you can do it by selecting the body element and modifying its CSS style property. Here's an example code snippet:

index.tsx
document.body.style.width = "100%";
36 chars
2 lines

Make sure you are executing this code after the page has loaded, such as inside a window load event listener. Also, ensure that there are no conflicting CSS rules that might be overriding this JavaScript setting.

related categories

gistlibby LogSnag