Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Vertical header / menu

  • Hi guys,

    i want a vertical header (not sidebar) and use the css of this site https://gpsites.co/sider/.
    The problem is that the header should positioned to the left of content with only 40px space.
    So it should not be fixed to the left edge of the screen.

    Some css pros here to help out?!

  • Hi there,

    Can you provide the link to the site?

  • Hi Alvind,

    the link is http://waldfriedhof.kronfink.com
    should look like this example of website

  • Hi there,

    its a tricky one, as the Site Header has a fixed position so it can’t easily reposition itself based on the screen size.

    So it would mean applying a different method.

    In your current CSS you have this CSS rule:

    
    /* Vertical header */
    @media (min-width: 1000px) {
        body {
            margin-left: 300px;
        }
    
        .site-header {
            position: fixed;
            left: 0;
            top: 0;
            width: 300px;
            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;
        }
    }
    

    Replace that with this:

    
    @media (min-width: 1000px) {
        body {
            max-width: 1600px;
            margin-inline: auto !important;
            display: grid;
            grid-template-columns: 300px 1fr;
        }
        #page {
            width: 100%;
        }
        .inside-header {
            position: sticky;
            top: 0;
        }
        .site-footer {
            grid-column: 2;
        }
        .site-header .main-navigation li {
            float: none;
        }
    }
    

    NOTE, in the top of the rule we set the max-width: 1600px; which is the overall max width of the Site Header + Content. Change that to wha you need.

    And fingers crossed 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.