Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CSS for fixed header

Featured Replies

Morning all. I was hoping for a bit of help. So I added the following to the Additional CSS field, in my wordpress theme. 

 

.site-header {
      position: fixed;
      top: 0;
      width: 100%;
      z-index: 2000;
}

.container {
      padding-top: 120px;
}

 

And it worked, the header is now finally fixed. But the problem I have now is that even though it's fixed on every page, it overlaps everything at the top of each page. Is there a way for it to not do that, or will I like have to make sure there is enough clear space on each page I add?

Without seeing the site and source code in action, it's hard to tell.

I'm guessing the container top padding should push everything down, but it's not working? If it's not working, it might be being overwritten by something else so you could add !important onto the end.

Or try this?

body { margin-top: 120px !important; }

 

  • Author

Thanks Wonky.... um I'm so confused now. I did it earlier, a few times over & over, but it kept pushing everything down. I've since started doing other bits here & there (just after starting this thread), nothing major, just adding / removing menu widgets & redoing the logo.... but I've just looked at it & it's not doing it anymore.

I might be back for more help :)

  • Author
1 hour ago, wonky said:

Without seeing the site and source code in action, it's hard to tell.

I'm guessing the container top padding should push everything down, but it's not working? If it's not working, it might be being overwritten by something else so you could add !important onto the end.

Or try this?

body { margin-top: 120px !important; }

 

I'm such a dolt 😃 There was a small menu widget which was being hidden under the header, which made it appear like it wasn't doing it anymore.

But this worked perfectly Wonky, thank you!!

  • Jo 90 locked this topic
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.