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.

Anchor Links Going To Wrong Position

Featured Replies

Hello

 

I am revamping my portfolio - http://iwillbeawebdeveloper.co.uk, however on Firefox and IE, the menu anchor links go to the wrong position and cut off a good chunk of the h1 tag.

 

It did happen on Chrome too, which is what I work and test on, and I fixed it with the following CSS:

.anchor {
    position: relative;
    border-top: -20px solid transparent;
    margin: -30px 0 0;
    -webkit-background-clip: padding-box;
    -moz-background-clip: padding;
    background-clip: padding-box;
}


.anchor:before {
    content: "";
    position: absolute;
    top: -110px;
    left: 0;
    right: 0;
}
This doesn't seem to make a difference on Firefox/IE.
Does anyone know why? Should I instead look at a jQuery fix?
Thanks
James

Edited by James Winfield

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.