An initial section on your website’s landing page offers an excellent opportunity to capture the attention of your visitors using images, text, and call-to-action buttons (CTAs). You can achieve this more efficiently by utilizing a grid to organize your content.
This guide will teach you how to establish a hero section based on a grid layout by implementing the following:
- Insert a grid
- Add an image
- Construct a content block
- Create an overlapping design
- Update the Body (All pages) tag
Include a Grid
The grid forms the core structure of your hero section.
To incorporate a Grid in your page:
- Navigate to the Add panel > Other section
- Drag a Grid onto your page
By default, the Grid presents 2 rows and 2 columns, which we’ll utilize for this demonstration.
- Click the Done button to save your Grid layout
- Assign a class to your Grid (e.g., “Landing hero section”)
- Click the plus icon to add rows or columns
- Hover over an existing row or column and press the trash icon to delete it
Note: The dimensions of the Grid are influenced by the contained content. Adding content will automatically adjust the size of the Grid.
- Choose the Grid
- Access the Style panel > Size
- Set the Height to 100 VH (viewport height)
Insert an image
- Drag a Div block from the Add elements panel into your Landing hero section
- Assign a class name to the new Div block (e.g., “Landing hero image”)
- Select the Div block
- Access Style panel > Backgrounds and click the plus icon to add a Background image
- Click Choose image to select an Image from the Assetspanel
- Click Cover
- Click the center dot under Position to align the image at the center of the Grid cell
Develop a content block
- Introduce a Div block from the Add elements panel into the upper right corner of the Grid
- Add a class to the new Div block (e.g., “Landing hero content”)
- Launch the Navigator panel from the left toolbar
- Access the Add elements panel
- Drag a Heading directly into the Navigator, and position it within the Home hero content Div block
Given that the Header now has a category, let’s customize it:
- Pick a new font you want to utilize In Design panel > Text > Font
- Select the font’s Thickness from the dropdown
Modify the Header hue:
- Activate the Color picker tool in Shades panel
- Hover above the Backdrop image in the initial Section unit and select a hue from the Picture
- Tweak the hue as necessary by shifting the Color and Translucency sliders
Let’s append more data to the data block. Append a Section:
- Open the Include components panel and drag a Section into the Primary title content Section unit
- Position it beneath the Header you previously included
Add Buttons to the data block:
- Drag a Tab from the Include components panel into the Primary title content Section unit
- Place it beneath the Area you just appended
- Twice click the Tab wording to adjust, and rename it (for instance, “Let’s converse”).
- Assign a category to the Tab (like, “Button”)
Modify the hue of your Tab to preserve layout uniformity:
- Pick the Tab
- Hit the default hue sample in Design panel > Background> Color
- Switch it to the hue you employed for your Header
Let’s establish some space for the content you’ve presently appended.
Append Space to the lower end of the Header:
- Hit the Header
- Unlock Design panel > Separation
- Set the base Space to 20 px
Considering you already attached a category of “Button,” you can copy/paste that Tab element to produce a sum of 2 Buttons:
- Evaluate the initial Tab
- Copy/paste the Tab
- Twice click the subsequent Tab’s wording and alter it (for example, “View our projects”)
Note: If you modify components of the Tab class, it’ll influence both Buttons at once since they have a similar category (like, “Button”).
For example, if you insert Space to the right of one Tab, the Space increment happens on both Buttons:
- Select one of your Buttons
- Unlock Design panel > Separation
- Set the right Space to 10 px
Design an overlapping layout
An overlapping layout signifies certain of your Grid components overlap each other. In this illustration, let’s form the data block overlap the Backdrop image.
Select the Primary title content Section unit.
Since its Placement is configured to Auto, it acquires the first obtainable cell in the Grid — the upper right cell.
Let’s position it in the bottom right cell of the Grid:
- Unlock Design panel > Grid Child > Placement
- Establish the placement of the Primary title content Section unit to Manual
- Drag the Section unit to the bottom right cell
Let’s repeat the same process on the Primary title Picture:
- Elect the Primary title Picture
- Unlock Design panel > Grid Child > Placement
- Establish the placement of the Picture to Manual
- Drag the lower right handle of the Picture across both Grid columns and rows to cover the entire Grid
To make your data visible over the Picture, alter the Section unit backdrop hue:
- Choose the Primary title content Section unit
- Unlock Design panel > Backgrounds > Color
- Hit the sample and choose a hue (for instance, white)
Tweak the size or quantity of rows and columns in your Grid:
- Evaluate the Primary title segment Section unit (the prime element)
- Press Enter or click the adjust Grid symbol
Currently segment height is set to Auto. Let’s alter this to a precise size:
- Click the bar that states Auto beside the peak Grid row to display the row sizing menu.
- Specify the top row as 1 FR (fraction unit)
- Repeat the process for the second row
By assigning 1 FR to each row, they will each occupy 50% of the viewport height using flexible FRs.
Replicate the above instructions to modify the row height. If you maintain the top row at 1 FR but switch the bottom row to Auto, the top row will utilize all the available space, and the bottom row’s height will adjust automatically based on the content within.
Click Done to complete editing the Grid.
Next, let’s enhance the content to improve its appearance.
Adjust the Heading Margin:
- Select the Heading
- Access Style panel > Spacing
- Tap the top Margin and modify it to 0 px
- Tap the bottom Margin and modify it to 20 px
Tweak the Paragraph Margin:
- Select the Paragraph
- Access Style panel > Spacing
- Adjust the default bottom Margin to 30 px
You can also manage the spacing of the elements within the content block — your Heading, Paragraph, and Buttons:
- Select the Home hero content Div block
- Access Style panel > Spacing
- Adapt its padding (the space within an element)
- Press Shift,and drag inside the Padding control to change all 4 sides to 30 px
Revise the Body (All pages) tag
Modifying the Body (All pages) tag readies your site and saves you time. For instance, altering the Font with the Body (All pages) tag selected influences the default Font for elements across your project.
The Body element acts as the top-level element of any page. To revise the Body (All pages) tag:
- Launch the Navigator and choose the Body
- Click the Selector field and opt for the Body (All pages)tag from the dropdown
Time to adjust the Font for the Body (All pages) tag:
- Click the Selector field and pick the Body (All pages)tag from the dropdown
- Access Typography > Font andchoose a font (e.g., “Source Sans Pro)
- Modify the Font size to 15 px
- Alter the Font line Height to a unitless measurement of 1.4 by typing in 1.4 and a hyphen (-)
Using unitless line height is advantageous as it scales the Font’s line height with the Font size. Discover more about Unitless line height.
Text elements without previously set overrides will inherit the modifications you made from the Body (All pages) tag.
You are now equipped with an enticing hero section — you hero, you!
- Include or eliminate Workspace spots and members - April 15, 2024
- Centering box summary - April 15, 2024
- Store a site for future reference - April 15, 2024