Site logo

Archived topic

Sider theme layout settings

6 replies · Started by Marcel on October 1, 2021

Viewing posts 1–7 of 7

Hello,

I use both premium Generatepress and Generateblocks. Now, trying to play with the Sider theme, I am not able to insert a block and create a full-width view.
What I would like to achieve: https://www.screencast.com/t/Xp5AAbYiy0
How it looks right now: https://www.screencast.com/t/Kk4nWPWLAkc
What I've done so far:
1. created a new page
2. chose current container type: full width
3. added a full-width container with a full-width Inner Container and imported a hero block from the GB template library. Video recording.

The page URL I play with is in the private area.
Thank you!
Marcel

Finally, I figured out how to solve it, but still, I have a space between the top and the block container I want to remove.

Hi there,

the GB Container Block you have for your content has 40px Padding all round, edit the Block > Spacing and set the padding to 0

Thank you, David. In order to make other GB blocks fit well on pages, I had to set up negative margins to the left and right of the main container (playing between -100px and - 200px).

1. On other note, please tell me how could I align the menu items to left? Right now they are aligned to the centre.

2. And I would like to move social icons on the same line with the copyright in the footer. How do you suggest doing that?

Thank you!

For that layout i would take a step back, not good having to use negative margins to overcome other CSS.
In the Customizer > Additional CSS you will see this:

@media (min-width: 1000px) {
    body {
        padding: 0 50px 50px;
        margin-left: 300px;
    }

    .site-header {
        position: fixed;
        left: 0;
        top: 0;
        width: 250px;
        z-index: 300;
        height: 100%;
        overflow: auto;
        overflow-x: hidden;
        -webkit-backface-visibility: hidden;
        -webkit-overflow-scrolling: touch;
        transition: .1s ease;
    }

    .admin-bar .site-header {
        top: 32px;
    }

    .site-header .main-navigation li {
        float: none;
    }
}

Which is the original Sider CSS for setting the fixed header. This CSS property:

body {
    padding: 0 50px 50px;
    margin-left: 300px;
}

I would change that toL

body {
    margin-left: 250px;
}

This will remove the padding from body, and position the content 250px left of the screen. As the header is only 250px wide.
With a Full Width GB Container it should fill the screen correctly.

1. For the menu item alignment:

.main-navigation .main-nav > ul {
    align-items: flex-start;
}
/* Optional make nav wider */
.main-navigation, .main-navigation ul ul {
    width: 100%;
}

2. Add this CSS:

@media(min-width: 1000px) {
    .inside-header {
        height: 100%;
    }
    .nav-float-right .header-widget {
        margin-top: auto;
    }
}

Thank you, David. Finally, I found out why the width of the page was too narrow for my needs.
In the Customizer > Additional CSS I see this:

.no-sidebar:not(.archive):not(.blog) .inside-article > *, 
.no-sidebar:not(.archive):not(.blog) #comments,
.no-sidebar:not(.archive):not(.blog) .paging-navigation {
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

I increased max-width to 1000px and it does the job now:

.no-sidebar:not(.archive):not(.blog) .inside-article > *, 
.no-sidebar:not(.archive):not(.blog) #comments,
.no-sidebar:not(.archive):not(.blog) .paging-navigation {
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;
}

Glad to hear that!

This archived topic is closed to new replies.