Title: Header Margin
Last modified: April 12, 2020

---

# Header Margin

 *  Resolved [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/)
 * Hi, I am trying to make Simple Banner fixed. I’ve used the custom CSS position:
   fixed; – and works but then covers my header. How can I fix this so my header/
   nav bar appears correctly and also will not alter the pages where Simple Banner
   is disabled?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fheader-margin-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Thread Starter [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12662025)
 * I’ve removed the position: fixed; for now so my site it operational in the meantime
 *  Plugin Author [rpetersen29](https://wordpress.org/support/users/rpetersen29/)
 * (@rpetersen29)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664500)
 * Hi [@apremierdj](https://wordpress.org/support/users/apremierdj/)
    Thanks for
   pointing this out, that’s a bug I’ll put in a fix for tonight. Thanks.
 *  Thread Starter [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664662)
 * Thanks, I just tested with your update and the header/ nav bar is still being
   hidden. i’ve put values in the top margin and padding but does not make any changes
   after clearing cache etc.
 * abelldjcompany.com
 *  Thread Starter [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664666)
 * I’ve changed to “static” for now so my site it operational in the meantime
 *  Plugin Author [rpetersen29](https://wordpress.org/support/users/rpetersen29/)
 * (@rpetersen29)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664795)
 * Hi [@apremierdj](https://wordpress.org/support/users/apremierdj/)
    First, for
   the header margin and padding values you can’t just put a number, you need to
   put a unit afterwards, usually thats `px`, so it would be `150px`. Secondly, 
   looks like you probably want the banner fixed in desktop mode, so keep it as 
   static in the positioning field up top, and in Website Custom CSS:
 *     ```
       @media only screen and (min-width: 990px) {
       .simple-banner {
           position: fixed;
       }
       header {
           margin-top: 40px;
       }
       }
       ```
   
    -  This reply was modified 6 years, 1 month ago by [rpetersen29](https://wordpress.org/support/users/rpetersen29/).
 *  Thread Starter [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664803)
 * Appears to look great on desktop. thanks for clarifying.
 * The header is still covered on mobile. any advice?
 *  Thread Starter [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664808)
 * Figured it out. Thank you!
 *  Thread Starter [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664810)
 * Is there a way to disable on “Posts”?
 *  Plugin Author [rpetersen29](https://wordpress.org/support/users/rpetersen29/)
 * (@rpetersen29)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664918)
 * Hi [@apremierdj](https://wordpress.org/support/users/apremierdj/)
    The recent
   update, 2.4.2, should fix the disabled pages issue you were seeing. Thanks for
   bringing this up!
 *  Thread Starter [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12664924)
 * I’m referring to “Posts” not “Pages”
 * I’d like to disable the banner on “posts”
 *  Plugin Author [rpetersen29](https://wordpress.org/support/users/rpetersen29/)
 * (@rpetersen29)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12667104)
 * Hey [@apremierdj](https://wordpress.org/support/users/apremierdj/)
    That’s a 
   feature that is currently in development but for now there is a workaround as
   written in my FAQ: [https://wordpress.org/plugins/simple-banner/#how%20do%20i%20disable%20the%20banner%20in%20my%20posts%3F](https://wordpress.org/plugins/simple-banner/#how%20do%20i%20disable%20the%20banner%20in%20my%20posts%3F)
 *  Thread Starter [apremierdj](https://wordpress.org/support/users/apremierdj/)
 * (@apremierdj)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12667910)
 * Yes, I seen this and added but does not appear to work on my site. Are you able
   to see why?
 * [https://www.abelldjcompany.com/creative-wedding-favor-ideas/](https://www.abelldjcompany.com/creative-wedding-favor-ideas/)
 *  Plugin Author [rpetersen29](https://wordpress.org/support/users/rpetersen29/)
 * (@rpetersen29)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12668071)
 * The javascript looks for something common in your posts url:
 *     ```
       document.addEventListener('DOMContentLoaded', function(){
         if (window.location.pathname.includes("post")){
           document.getElementById('simple-banner').remove();
         }
       }, false);
       ```
   
 * `window.location.pathname.includes("post")` looks for `post` in your URL. If 
   you’re looking to remove from a specific page then use this:
 *     ```
       document.addEventListener('DOMContentLoaded', function(){
         if (window.location.href === "YOUR_WEBSITE_URL_HERE"){
           document.getElementById('simple-banner').remove();
         }
       }, false);
       ```
   
 * If you want a few specific urls then:
 *     ```
       document.addEventListener('DOMContentLoaded', function(){
         var urls = ["URL1", "URL2", "URL3"];
         if (urls.includes(window.location.href)){
           document.getElementById('simple-banner').remove();
         }
       }, false);
       ```
   

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Header Margin’ is closed to new replies.

 * ![](https://ps.w.org/simple-banner/assets/icon-256x256.png?rev=1198700)
 * [Simple Banner - Easily add multiple Banners/Bars/Notifications/Announcements to the top or bottom of your website](https://wordpress.org/plugins/simple-banner/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-banner/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-banner/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-banner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-banner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-banner/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [rpetersen29](https://wordpress.org/support/users/rpetersen29/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/header-margin-3/#post-12668071)
 * Status: resolved