- This topic has 31 replies, 4 voices, and was last updated 2 years, 7 months ago by
David.
-
AuthorPosts
-
January 24, 2022 at 6:18 am #2091650
Jason
Hello,
I’m trying to build a left sidebar navigation layout using GP. Is that possible ? And if yes, where should I start ?
I’m using WPBakery as page builder if it matters. Here is a screenshot of the layout that I’m trying to achieve.
The left sidebar navigation should be fixed and only the content will scroll.January 24, 2022 at 6:47 am #2091687David
StaffCustomer SupportHi there,
theres a site titled Sider in the Site Library that displays a vertical header like that on Desktop:
I think that would be a good starting place.
January 24, 2022 at 6:51 am #2091693Jason
Is there a way to do it w/o having to import that layout ?
I see there is an option in Customize – Layout – Primary Navigation (Left Sidebar). Which seems to work, but the logo is not included in the sidebar…January 24, 2022 at 7:21 am #2091721Jason
Ok, so I imported the layout that you specified, and looks pretty cool. Is there a way to add other elements to the left sidebar? Like social icons, text or anything else ?
Thank you!January 24, 2022 at 7:38 am #2091742David
StaffCustomer SupportThe Sider site uses the Customizer > Widgets > Header Widget for adding other stuff like social icons etc.
Is there somewhere specific you want to add some other stuff?January 24, 2022 at 7:40 am #2091746Jason
Yeah, phone, email, stuff like that…
January 24, 2022 at 7:44 am #2091750Jason
Oh, and how can I position it inside the sidebar ? Sorry, I didnt properly read your question.
January 24, 2022 at 8:16 am #2091963David
StaffCustomer SupportSo you can add it to the Widet area, and that will be displayed below the menu.
If you then need that position to change eg. push it to the bottom of the side header then it will take some CSS.
If you can share a link to the site and let me know the specifics i can assist with thatJanuary 24, 2022 at 11:39 am #2092166Jason
I think I managed to arrange the content, the only problem that I’m having, is that on certain devices, smaller height devices, the sidebar has a scroll on it… I’ve attached the link to the DEV website. Thank you David!
January 24, 2022 at 12:33 pm #2092212Ying
StaffCustomer SupportHi Jason,
The method you are using now (sider template) is suitable for shorter site header.
We can try another method to make it like this: https://www.screencast.com/t/R3H1Ueq3
Let me know if this is what you are looking for 🙂
January 25, 2022 at 7:04 am #2092985Jason
Yeah, that will be perfect actually.
January 25, 2022 at 10:34 am #2093418Ying
StaffCustomer SupportTry to follow below steps:
1. Change this CSS:
body { padding: 0 50px 50px; margin-left: 300px; } .site-header { position: fixed; left: 0; top: 0; width: 350px; z-index: 300; height: 100%; overflow: auto; overflow-x: hidden; -webkit-backface-visibility: hidden; -webkit-overflow-scrolling: touch; transition: .1s ease; background: linear-gradient(180deg, rgba(167,19,38,1) 0%, rgba(135,4,7,1) 100%); }
to:
body { display: flex; flex-wrap: wrap; justify-content: flex-end; } .site#page, .site-footer { width: calc( 100% - 350px); } .site-header { position: sticky; left: 0; top: 0; width: 350px; z-index: 300; height: 100%; overflow: auto; overflow-x: hidden; -webkit-backface-visibility: hidden; -webkit-overflow-scrolling: touch; transition: .1s ease; background: linear-gradient(180deg, rgba(167,19,38,1) 0%, rgba(135,4,7,1) 100%); }
Let me know if that works 🙂
February 4, 2022 at 5:26 am #2105010Jason
Sorry for late reply, it worked on small screen devices, like laptops, but looks weird on 1080p resolution or 2k.
Is it possible to extend the sidebar bg color on bigger devices all the way down ?
The same looks on 1920×1080, only the fact that the white space is smaller…
Here’s a screenshot from a 2560×1440 monitor:February 4, 2022 at 6:45 am #2105062David
StaffCustomer SupportIn the
.site-header
CSS rule add this property;min-height: 100vh;
February 4, 2022 at 11:24 am #2105580Jason
Worked, thank you !
-
AuthorPosts
- You must be logged in to reply to this topic.