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.

Fixed header causing problems.

Featured Replies

Hey, I've done a bit of web development before but never had to use the fixed position in CSS. I've got a simple site, just a header and long page of content(navigation is just anchors to parts of the page) so the header needs to stay fixed to the page when the user scrolls. I'm having problems though as when I set the header to position fixed the content div starts from the top of the page rather than under the navigation so part of the content is cut off as it's hidden behind the header. I'm assuming this is an easy fix. I have code to post if it helps. Thanks.

You can just put another relatively positioned div of the same height below your fixed header.

  • Author

ahh never thought about that! Done that, so now it loads fine first time, but when I press one of the navigation buttons that anchor to the divs, it doesn't stop at the start of the div it cuts a few lines off. Is this something to do with the header still covering it?

Could you move the anchor a bit higher (<a name="anchor"></a>), so the content you want to display isn't behind the fixed header?

Create an account or sign in to comment

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.