What are Vertical Sticky Headings?
Vertical Sticky Headers are a type of header bar that is fixed to the side of the page and stays visible as the user scrolls down the page, allowing for easy access to other page areas or quick navigation. This design can be used for content such as catalogs, navigation menus, and contact information to make browsing easier for the user.
![图片[1]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103102435243.jpg)
preliminary
Before you start, make sure you have the following in place:
- Installed and activated Elementor Pro plugin (because the sticky effect requires the Pro version).
- Created a new page or ready to add vertical sticky headers to an existing page.
- Already understand the basic usage of the Elementor container (it is recommended that the Flexbox (operating in container mode).
Step 1: Create a single page template
We create a single page template this time, and for this template we create vertical sticky headers with containers.
Go to the template creation page
- In the WordPress backend, navigate to Elementor > Templates > NewThe
![图片[2]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103007253127.png)
- In the pop-up window select single page as the template type and name the template, e.g. "Enterprise Service Page Template".
![图片[3]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103007280191.png)
Select Page Type
- At the top of the template gallery select "Pages." Tags.
- Browse through the library of available page templates. You can use the search box to find a suitable template style, such as "Services" or "Company".
![图片[4]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103007341142.png)
- If it is dedicated to a certain type of page, you can also add a specific condition in the condition settings.
Step 2: Creating a Container in Elementor
1,Adding Containers
On the page, click "Adding a new container" and drag it to the page design area. This container will serve as the parent container for the vertical sticky header.
![图片[5]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103007434958.png)
2,Setting the container orientation
Select the container, and in the settings panel on the left, set the container's orientation to perpendicular, i.e. vertically aligned so that content can be stacked vertically. This step is the key to achieving vertical headings.
![图片[6]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103007450114.png)
3,Define container width
In "type" tab, set the width of the container to an appropriate size, such as 200px or less, to ensure that it does not take up too much space on the page. You can customize this width according to the page design and requirements.
![图片[7]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103007462345.png)
Step 3: Create a vertical sticky navigation bar
Insertion of headings and navigation items
- In the container, add a "caption" widget, set the title to "Quick Navigation" or "Catalog".
![图片[8]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103007515381.png)
Add List
- Underneath the title, continue to add in the same container as the title Icon List maybe Button WidgetUsed as a navigational itemWe use a list of iconsThe
![图片[9]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103101403771.png)
- Added:
![图片[10]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103101420612.png)
Add Project
- About Us: Click on it to jump to the company profile section.
- Service: Jump to the Service Program Description area.
- Testimonials: Jump to the Customer Feedback section.
- Contact Us: Jump to contact information and forms.
![图片[11]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103101453063.png)
Names and icons can be modified.
![图片[12]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103101474957.png)
Setting up anchor links
Add anchor links to the list of buttons or icons for each navigation item. Set anchors for each content section of the page, for example #about-us
,#services
,#testimonials
,#contact-Us
etc.
![图片[13]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103008204010.png)
- set upAbout Usanchor point
- In the Elementor editor, find the "Menu Anchor" Widget. Drag the widget above the title of the About Us section (or other suitable location). In the widget's settings, enter a name for the anchor point (e.g.
about-us
) to link to that location later.
- In the Elementor editor, find the "Menu Anchor" Widget. Drag the widget above the title of the About Us section (or other suitable location). In the widget's settings, enter a name for the anchor point (e.g.
![图片[14]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103008241275.png)
![图片[15]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103008252186.png)
- Setting Anchor Links
- Back to the list of iconsAbout Usat the top of the page, add
#about-us
You can click the jump after the anchor link.
- Back to the list of iconsAbout Usat the top of the page, add
![图片[16]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103101494547.png)
- The remaining menu items follow this procedure to set their anchor links.
![图片[17]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103008403465.png)
Customize navigation bar style
- In "type" tab to customize the fonts, colors, and spacing to match the style of your website.
![图片[18]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103101553146.png)
![图片[19]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103101570334.png)
- configurablebackground color, margins and shadow effects to make the navigation bar clearer and more independent.
![图片[20]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103101590860.png)
Step 4: Setting the Sticky Effect
To make the sidebar stay fixed while the user scrolls, follow these steps:
- Setting CSS IDs for navigation bars and content areas
Select the navigation bar container and "high level " tab to add a CSS ID; for example, set the ID tosidebar
The
![图片[21]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103102011512.png)
- Add custom CSS code
Open Custom CSS (Global Settings or Custom CSS for Navigation Bar Container) in Elementor. Add the following code:
#sidebar{
position: fixed; /* Fixed sidebar position, does not move when scrolling */
left: 0; /* Align the sidebar to the left side of the page */
top: 0; /* Sidebar starts at the top of the page */
height: 100vh; /* Set sidebar height to window height */
width: 200px; /* Adjust the width of the sidebar as required */
z-index: 10; /* Ensure the sidebar is above other elements */
padding-top: 250px; /* Adjust the top inner margin as required */
overflow-y: auto; /* Allow scrolling when sidebar content is long */
display: flex; /* Layout using flexbox */
flex-direction: column; /* Align content vertically */ justify-content: center; //
justify-content: center; /* vertically centered content */
}
![图片[22]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103102281121.png)
Step 5: Add background style and shadow effect (optional)
Setting the background color
In "type" tab, select the appropriate background color to ensure that the containers are clearly distinguishable on the page.
![图片[23]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103102293169.png)
Adding a shadow effect
In order to make the sticky title look more hierarchical, you can set the shadow effect in the "Box Shadow" to make it have a visual effect of hovering on the page.
![图片[24]-如何在 Elementor 中创建带有容器的垂直粘性标题-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024103102313972.png)
Step 6: Preview and Publish
- Preview effect
Click on the page "previews" button to see how the sticky header behaves when the page is scrolled. Make sure that the container is always fixed at the top of the page when scrolling and is not overwritten by other elements. - Adjustments
According to the preview effect, adjust the size, alignment, and margins of the container of the title content to ensure that the content is clear and does not affect the layout of other elements on the page. - Launch page
After confirming that everything is working properly, click "post" button to bring the page online. Your vertical sticky header has been created.
Summary:
Vertical sticky headers are navigation bars that are fixed to the side of a page and can be kept visible as the user scrolls, allowing them to quickly access different parts of the page. Creating such headers in Elementor involves a few key steps: first, create a single page template and add a vertically oriented container as the body of the sticky header bar. Next, add headings and navigation items to the container, using a list of icons or button widgets with anchor links for each item. Then, apply CSS code to anchor the sidebar, making sure it's always visible when scrolling.
Link to this article:https://www.361sale.com/en/22538The article is copyrighted and must be reproduced with attribution.
No comments