What do you think about the course so far?
Thank you for your feedback!
Explore more topics
Sebi Vidret
Product Marketing Manager
I am an Editor X Product Marketing Manager, focused on the planning & execution of the Editor X education initiatives. Being obsessed with website development, I built my first site at 13 years old. Now I teach these skill to other aspiring creators. When I'm not designing on Editor X, you can find me making asado, playing soccer, and drinking mate with friends.
How to create a full height section
What is a full height section?
In a full height section, the design covers the entire height of the screen or the viewport, which is the canvas where the site is displayed. In a browser, the viewport does not include the address bar or the rest of the interface.
How do you set it up?
To create a full height section, we’ll use the vh unit of measurement, which lets us calculate values based on height. Setting the section height to 100vh means that the section will take up 100% of the viewport height. This measurement lets us adjust the height of the section according to the viewport, which means the design will also adjust.
How is it calculated?
For this design, we’ll apply a 3x3 grid with 3 columns and 3 rows and we’ll adjust the rows and columns.
Column 1: set as 56%
Columns 2 and 3: 1fr by default so they’ll divide the remaining area equally
The rows will create the height of the section so we’ll give them a vh value.
Row 1: The header row is set as 10vh
Rows 2 and 3: set as 45vh
Total for 3 rows: 100vh
The 3 rows will cover the full height of the viewport. If the rows total less than 100vh then they won't cover the full height of the viewport. If they’re more than 100vh, then there’ll be a vertical scroll.
Vh is also relevant for margins when creating responsive designs so that the elements’ position will adjust as the viewport height adjusts.
Can you set the header to be a fixed height?
As the height of the viewport adjusts, the header section automatically adjusts as well. Sometimes you want to adjust the size of the rows but not the header. Pixels are ideal here so we can be precise with our calculations.
The header is set to be 66 px high so that it’s fixed in size
Row 1: Set as calc (50vh - 33 px)
Row 2: Set be calc (50vh - 33 px)
Total rows 1 &2: 100vh minus 66px from the header
When you view the design in preview, the header is fixed and does not adjust as the viewport adjusts.