Hi everyone!
I’m trying to get my website to adapt to the screen resolution…
I’ve Googled it, WixCoded it, Support Forumed it and I just cannot seem to get my website to adapt to the screen size.
Can anyone prove it works? Can someone spoon feed me, as I don’t even know if I am using the right code! I’m using Wix Window with the following code:
import wixWindow from ‘wix-window’;
// …
wixWindow.getBoundingRect()
.then( (windowSizeInfo) => {
let windowHeight = windowSizeInfo.window.height; // 565
let windowWidth = windowSizeInfo.window.width; // 1269
let documentHeight = windowSizeInfo.document.height; // 780
let documentWidth = windowSizeInfo.document.width; // 1269
let scrollX = windowSizeInfo.scroll.x; // 0
let scrollY = windowSizeInfo.scroll.y; // 120
} );
Is this the one…?
I’d really appreciate some help!
Dan