Setting strip height to viewport size

Hi everybody,
I’d like the main video on my website’s homepage to expand to fill 100% of the viewport’s height, on whichever device it’s rendered. Currently, the strip which contains the video fills the screen when displayed on my laptop, but on a larger desktop screen (1980X1080) it only covers 1/3 of the browser’s window.

Already reached out to Wix support, and their response was that even within WIx Code, it is not possible to access or modify CSS elements of a Wix website (the main strip’s height property, for that matter). They said that the platform automatically resizes the element for best use in the platform on which it is being displayed.

In order to make a Wix website fully responsive, it’s crucial to add a feature that allows elements to fill 100% of the window, on ALL device types, like the example below:
https://www.sevengramscaffe.com/

Thanks.

11 Likes

completely agree, I can’t believe they haven’t managed to offer this as an option yet, it makes the UX seem completely unprofessional

this really needs to be implemented, even if only via code. very frustrating not being able to design fullscreen pages/strips…

Don’t understand what’s so hard about this; If we had access to CSS it’d take 30 seconds.

Completely agree. Frustrating that they are not rectifying this issue. Such a crucial issue.

It’s been a year now since last post. Any progress/update? Anyone found a solution?

Wix? You guys there? Any reason we can’t access the height property of a strip?

Nothing yet? So many sites with single pages and even more landing pages are build that way. Come on Wix, give some solution please.

Basically this is possible by using html text within the strip (on the top)
And set the text height according to the screen height.
Try it yourself.

var style1 = “vh;height:” + 100 + “vh”;
$w(“#text1”).html = “<” + “h1” + " style=" + style1 + “>” + $w(“#text1”).text + “</” + “h1” + “>”;

You can see an example of this in Link - this is a little demo I made
https://www.wixproisrael.com/demo1

Thank you! Example looks good. I´ll check out the code and try it for myself.

This is really cool, great work. Can you please share the code behind the whole page? Thank you!

Hey!

This works great! Thank you!

How did you manage to change font color? When I use code for color then 100% height stops working. I can´t find a way to have responsive height and desired color.

Very Nice !!
Too bad you don’t tell how to do an auto height of a strip !! I’ve looked everywhere in the documentation but cannot find how to do an auto height of a strip. Inline styling ??

@emandias I don´t think that is possible, as least with Wix in this version. If you use code from above on the text and put text on strip, strip will be responsive.

@rudjersimek Yes Ruder, I already tried it. I only hope that wix make it possible to change (inline) styles or at least give a strip an auto height. But for now this workaround will do.

It’s Javascript. The original code is right there in your browser’s developer tools. Wix even prints the names of the main two files containing site and page code to the console on page load.

Hi Can you explain steps please…um struggling to make it work

Would love to see how/where to add this code in :smiley:

In Editor turn on Dev Mode. Insert a text filed to the strip you want to be height responsive. Make sure that the top of the text box touches the top of the strip.
Copy the code given above to the code section at the bottom of the page. The final code after you copy will look like similar to this.
$w.onReady( function () {
//TODO: write your page related code here…
var style1 = “vh;height:” + 100 + “vh” ;
$w( “#text25” ).html = “<” + “h1” + " style=" + style1 + “>” + $w( “#text25” ).text + “</” + “h1” + “>” ;
});
Make sure to change ‘text25’ to the actual name of your text box (you can see the text box name when you click it in the editor). It might be some other number like ‘text20’ or ‘text29’ or something like that. Maker sure to change name in both the places in teh code.

How were you able to get the snap scrolling on the demo site?