Skip to main content
harsha20599
New Participant
May 23, 2025 10:02 AM UTC
Question

Adding 100vh or 100% height in figma sites

Hello,

I am looking to create a good hero section for my site, where it should take the height of browser in the first fold. The subsequent sections can be of fixed heights based on content. 

I need something like 100vh to have for my hero section.

20 replies

Guilherme Laureano
New Member
Feb 14, 2026 4:04 AM UTC

There is actually a way to do this, but it’s not intuitive at all — Figma should fix this urgently.

Let’s go. Using Figma Sites, from what I’ve noticed, by default all created elements are rendered inside a div with the ID #container. So, if this isn’t something consistent, everything I wrote below can be disregarded.

In order to use sizes relative to the viewport, we need to write a few lines of basic CSS code.

 

 The Simple Way:

 

<style>#container{min-height:100vh;}</style>

 

The preview:
 


This is just a basic demonstration. You can also add classes to elements by editing the TSX component and inserting similar CSS code to define the height. This way, only an inner section will have a height of 100vh. But it takes a bit more work to create the demonstration/screenshots.

Something like: 

<style>.l-heroSection{min-height:100vh;}</style>

The point is: yes, it can be done, but come on @Figma — you could make this simpler, right?

This is something so common in real projects that it’s surprising it isn’t available in such a popular software.

Nick Brosas
New Member
Mar 11, 2026 8:26 PM UTC

There is actually a way to do this, but it’s not intuitive at all — Figma should fix this urgently.

Let’s go. Using Figma Sites, from what I’ve noticed, by default all created elements are rendered inside a div with the ID #container. So, if this isn’t something consistent, everything I wrote below can be disregarded.

In order to use sizes relative to the viewport, we need to write a few lines of basic CSS code.

 

 The Simple Way:

 

<style>#container{min-height:100vh;}</style>

 

The preview:
 


This is just a basic demonstration. You can also add classes to elements by editing the TSX component and inserting similar CSS code to define the height. This way, only an inner section will have a height of 100vh. But it takes a bit more work to create the demonstration/screenshots.

Something like: 

<style>.l-heroSection{min-height:100vh;}</style>

The point is: yes, it can be done, but come on @Figma — you could make this simpler, right?

This is something so common in real projects that it’s surprising it isn’t available in such a popular software.

This worked beautifully, thank you. Silly that it needs a work around, but I’m glad it worked.

JettyLou
New Participant
Mar 12, 2026 10:54 PM UTC

Dynamic sizing or relative units are basic web design. How did this get missed in the release? 😭

Caveman
New Participant
Apr 15, 2026 2:11 PM UTC

Hello,

I am looking to create a good hero section for my site, where it should take the height of browser in the first fold. The subsequent sections can be of fixed heights based on content. 

I need something like 100vh to have for my hero section.

Figma pleaseee 😩😭😭

Caveman
New Participant
Apr 15, 2026 2:18 PM UTC

There is actually a way to do this, but it’s not intuitive at all — Figma should fix this urgently.

Let’s go. Using Figma Sites, from what I’ve noticed, by default all created elements are rendered inside a div with the ID #container. So, if this isn’t something consistent, everything I wrote below can be disregarded.

In order to use sizes relative to the viewport, we need to write a few lines of basic CSS code.

 

 The Simple Way:

 

<style>#container{min-height:100vh;}</style>

 

The preview:
 


This is just a basic demonstration. You can also add classes to elements by editing the TSX component and inserting similar CSS code to define the height. This way, only an inner section will have a height of 100vh. But it takes a bit more work to create the demonstration/screenshots.

Something like: 

<style>.l-heroSection{min-height:100vh;}</style>

The point is: yes, it can be done, but come on @Figma — you could make this simpler, right?

This is something so common in real projects that it’s surprising it isn’t available in such a popular software.

Is there a way you can explain better?

how do I know the IDs of different sections, or does it take the name of the frame?

Francesco Milana
New Member
Jul 14, 2026 7:08 PM UTC

@figma this is basic stuff. I think you can add it in half a day or less

 

Tobias Hofmann
New Participant
Aug 30, 2026 6:52 AM UTC

Guilherme Laureano’s workaround works for the moment, but please Figma. With the release of Sites this is totally necessary.

Tobias Hofmann
New Participant
Aug 31, 2026 6:49 AM UTC

 

Is there a way you can explain better?

how do I know the IDs of different sections, or does it take the name of the frame?

 

Once you publish your site, open it in your browser, hit F12 (or Right Click > Inspect). Then hit Ctrl(or Cmd)+Shift+C and select the container you’re looking for. Now check for the id you need and use it in your code. 

Hope this helps.

 

Brett Hilton
New Member
Oct 1, 2026 7:44 PM UTC

Need this feature yesterday

Wale Calfos
New Member
Oct 25, 2026 10:21 AM UTC

Still waiting for this update...