internal link anchor to take as reference the top navigation bar instead the top of the screen - scroll

Hello I'm using internal links in a page that also uses a fixed top navigation bar. As you may have guessed already, the header of the seccion linked is left below that top bar as the browser scrolls the top of the screen to that point and not the border of the top bar. How can I make up por this so the header of each linked section is left just below the topbar? Thank you!

Related

Gatsby anchor link / scrollTo hiding the page above the displayed element

I am using Gatsby for the first time and I have started with the Cara starter template.
I have added a link to the hero that would scroll to the next sections (projects) when clicked.
The link does take you to the next section, however the scroll bar remains scrolled all the way to the top of the bar. Meaning that you cannot scroll back up the page. (Strangely now when you scroll to the bottom of the page, the footer is not aligned with the bottom of the page, but you can now scroll all the way back to the top of the page again.)
I tried using various techniques; a standard anchor tag referencing an id, using gatsby-plugin-smoothscroll to scrollTo() the element, and all have this same end result.
I'm not sure what is causing this behaviour, but maybe it is something to do with the layout or some conflicting scrolling or offsetting. I would appreciate any help to get me back on track.
I have hosted what I have done so far, so that you can see the issue I am having:
https://portfoliositemain36740.gatsbyjs.io/

Fullpage.js - Anchor point on mobile not going back to top of the section when scrolled through

I have this website -> https://life-5.webflow.io/ used with Fullpage.js.
If you open the website on mobile and try to tap one of the links in menu, everything goes fine.
For example "Výhody" are made from 5 tabs.. If you tap the link on top of the page you goes to 1st one, but if you scroll through the section and taps the "Výhody" once again, you get scrolled only to 5th tap and not to the top.
Any help how to fix this and makes the link always goes to the top of the section?
Thanks a lot for any help!
Check out the bigSectionsDestination option.
From the the fullpage.js documentation
bigSectionsDestination: (default null) Defines how to scroll to a section which size is bigger than the viewport. By default fullPage.js scrolls to the top if you come from a section above the destination one and to the bottom if you come from a section below the destination one. Possible values are top, bottom, null.

NativeScript last element in scrollview partially hidden by Bottom Navigation

I am using tabbed navigation for my nativescript app. I have a playground sample here https://play.nativescript.org/?template=play-ng&id=WKlZDF&v=6
On the second tab, I have a list of tasks that is longer than most screens can display so it is wrapped in a <ScrollView>. The scrolling works as expected except when you get to the bottom. The final element is partially hidden by the <BottomNavigation>. If you drag up on the screen you can see the rest of the element but the second you release the screen it slides back down behind the <BottomNavigation>.
You can see what I am talking about in the playground or in the screenshot below. Does anyone know how to correct this? I thought about just adding a bunch of padding at the bottom but that seems super hackey.

How can I make the top and bottom elements of my view controller stay in place, while the middle has elements to vertically scroll through?

I'm working in Swift 3 and XCode 8.
I tried to find the answer to this question, but maybe I don't know how to ask it properly. I'm trying to have a title bar at the top of a view controller and have a back and next button at the bottom of the view. The content in between is longer than the space that exists, so I would like the user to be able to scroll the middle, but keep the top and bottom elements anchored in place.
I've tried to use a container with another view controller that is larger than the container to make this happen, but it just resizes the child view controller.
If I'm not explaining something properly, please let me know and I will try to give more information about what I've missed.
I'm making a few assumptions about your Views:
Navigation Bar for your title
Toolbar to hold your Back and Next buttons
Try the following:
Place a Navigation Bar as seen below. Do not set any constraints.
Place a Toolbar as seen below. Again, do not set any constraints.
Place a Scroll View in the centre of your View Controller and expand it so that the top and bottom are aligned with the navigation bar and toolbar respectively. Again, do not set any constraints.
Highlight all of the Views in the View Controller and place them in a Stack View.
Pin the Stack View to the Superview. These are the only constraints that are set in the example below.

Every view without the Navbar or Tabbar is pushed down 20px

I'm building my iphone app.
I've got a problem. For every view without the Navigation bar and the Tab bar is pulled up of 20px.
So I have to place every elements 20px below the top edge.
In this screenshot http://ge.tt/4FG1fJ9 you see the Interface builder view, with 20px bar space at the top, and the result into the Simulator.
This solution works, but give me some problems, and it's not elegant.
I'm wondering why all this happens.
Have you got any idea?
Thanks
In Interface Builder, open your xib, click on the root UIView and then hit Cmd-1. That will bring you to the UIView Attributes window. There are a few drop downs for "Simulated UI Elements" and you can set the Status Bar to Black (or whatever the option is). This doesn't add the status bar to your view, it just simulates the size of the status bar so that you can layout your views without having to shift everything down by 20 pixels.
This is a common problem that seems to rear it's head in different ways. The cause, though, usually has to do with poor coordination of the status bar.
I was able to reproduce the problem just now in a test app by adding a 'Status bar is initially hidden' line to my Info.plist and setting it to YES. The app looks fine in the main view, but if I push a new view controller and then set the status bar to display, the new view appears shifted down 20px. That is, the top of the view appears 20px below the bottom of the status bar.
I know that's not a terribly specific answer, but take a look at how you're hiding/showing the status bar in your app, and also how you have the simulated status bar in your .xib files set.

Resources