I can’t modify a strip such that it covers the entire height of a wixWindow.
Could you please help me?
Hello there
Sadly, that’s simply NOT POSSIBLE in the Classic Editor since it has no vertical responsiveness , nor does it admit viewport units (vw or vh).
I know there’s no problem to set some items –including strips, which you’re asking about– to fill the entire width of the viewport but that’s been supported by HTML5-based websites since the very beginning.
The only way Wix allows a strip (section), container, image or element to admit viewport-height units, and hence, to cover the entire viewport height, is through the EditorX : the first fully responsive editor originally developed by Wix released last year and recently launched off-beta stage. Though they aren’t called ‘strips’ anymore but ‘sections’.
You can use EditorX with your same Wix account and even for free, you can create a new website from scratch, select the first section under the header, and set its height at 100vh at the Inspector. You should give it a go; and if you have any questions, you can watch some tutorials at the AcademyX or post your questions at CommunityX .
Sorry but… there is simply no way to achieve responsivity just by coding through the Velo from the classic HTML editor. Trust me, I asked the same question you’ve just asked to many Corvid (named that way before) Experts and searched through the whole Velo’s forum before the release of EditorX.
If it’s not editor X, you’ll have to create the strip using a Custom Element (if you have a premium account) and you can set the custom element to have height of 100vh.
Another way is to use a Wix strip and create a custom code (via the dashboard > setting), to the end of the body: select the strip and assign it style.height using JS.
@jonatandor35 targeting a strip with $w('#myStripId')
does not allow me to change the height of that element. This lives in the $w.onReady
scope, so it should be correct, shouldn’t it?
I should be able to do $w('#something').style.height = "100vh"
but I can’t. Any ideas why?
Thanks for your help
@alessandrascandola95 You cannot do it via Velo.
If you have a premium account you can set it using custom element or custom code .
@jonatandor35 Ok, I see, but I thought that Velo is meant be used for this purpose.
What is Velo used for then?
I’m just designing some websites for clients and I want to make sure that all I want to do is possible. I will trust you that this modification is possible, but we can’t just jump onto premium packages without knowing what’s possible and what’s not. Can we add custom css if we have a premium account? I don’t like having verbose definitions and code in the header, I’m wondering if there’s a better strategy for that. Thanks for your replies.
@alessandrascandola95 if you go for EditorX you can set any element to be 100vh via the editor.
However with the regular editor you cannot (and you’ll have to use custom code or custom element with premium account).