• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

how to make portfolio header stay fixed to top

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › how to make portfolio header stay fixed to top

This topic is: not resolved

Tagged: portfolio header

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 3 months ago by DigitalSuit.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • March 3, 2016 at 6:00 am #180521
    DigitalSuit
    Member

    Hello
    I'm trying to make the header stay at the top of the page,
    meaning to make stay while I scroll down
    I tried a couple of things that I saw on other threads but none of them works.
    help anyone ?

    thanks

    http://www.bengo.co.il
    March 3, 2016 at 6:04 am #180522
    Jason Weber
    Member

    Custom CSS or in your /wp-content/themes/modern-portfolio-pro/style.css at the bottom:

    /* Sticky header */
    
    .site-header {
        position: fixed;
        width: 100%;
        z-index: 1000;
    }
    
    nav.nav-primary {
        padding-top: 164px; /* height of header (can be easily obtained using Chrome Inspector or Firefox Firebug) */
    }

    Webby’s WebPrezence
    National Center For Due Process

    March 3, 2016 at 7:21 am #180527
    DigitalSuit
    Member

    Thanks Jason
    Unfortunately its not working
    I have few classes which I suspect
    1st suspect - the "Site Header" section in the CSS, but every time I add the "Position: fixed;" it messes up the header completely
    2nd suspect - the " Float Clearing" section, but again its not fixing it
    Site Header
    ---------------------------------------------------------------------------------------------------- */
    .site-header .wrap {
    border-bottom: 1px solid #222;
    overflow: hidden;
    padding: 1px 0;
    font-weight: 700;
    font-size: 20px;
    }

    .mpp-home .site-header .wrap {
    border: none;
    }
    /* Float Clearing
    --------------------------------------------- */
    .author-box:before,
    .clearfix:before,
    .entry-content:before,
    .entry:before,
    .footer-widgets:before,
    .nav-primary:before,
    .nav-secondary:before,
    .pagination:before,
    .site-container:before,
    .site-footer:before,
    .site-header:before,
    .site-inner:before,
    .widget:before,
    .wrap:before {
    content: " ";
    display: table;
    }

    .author-box:after,
    .clearfix:after,
    .entry-content:after,
    .entry:after,
    .footer-widgets:after,
    .nav-primary:after,
    .nav-secondary:after,
    .pagination:after,
    .site-container:after,
    .site-footer:after,
    .site-header:after,
    .site-inner:after,
    .widget:after,
    .wrap:after {
    clear: both;
    content: " ";
    display: table;
    }

    March 3, 2016 at 7:25 am #180528
    Jason Weber
    Member

    I don't see the snippet in your CSS.

    Anyway, the more recommended way is to download Simple Custom CSS, activate the plugin, and put that snippet in there.

    That will take precedent over anything in your child theme's stylesheet, and you won't have to worry about altering your child theme's core files.


    Webby’s WebPrezence
    National Center For Due Process

    March 3, 2016 at 8:39 am #180533
    DigitalSuit
    Member

    I tried both ways, in the custom css and in the original css, both resulted in a strange outcome

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble