The 'about' section of this website is very long, so I added arrow buttons at the bottom of each section to take you to the section below. I did this by adding the relevant section ID to each button and then enabled smooth scrolling with this:
html {
scroll-behavior: smooth;
}
I'm fairly happy with how it works, except that when it scrolls down it lines up with the text in the section, rather than the top of the section itself, which doesn't look as good (so basically there is no margin at the top). Does anyone know how to make it line up with the top of the section?
A second question – is there additonal code i can add to control the speed of the scroll?
Question
matthewhodges 7
Site URL: https://www.botisseva.com/about
The 'about' section of this website is very long, so I added arrow buttons at the bottom of each section to take you to the section below. I did this by adding the relevant section ID to each button and then enabled smooth scrolling with this:
html {
scroll-behavior: smooth;
}
I'm fairly happy with how it works, except that when it scrolls down it lines up with the text in the section, rather than the top of the section itself, which doesn't look as good (so basically there is no margin at the top). Does anyone know how to make it line up with the top of the section?
A second question – is there additonal code i can add to control the speed of the scroll?
Link to post
Top Posters For This Question
2
1
Popular Days
Mar 3
2
Mar 2
1
Top Posters For This Question
matthewhodges 2 posts
AndreaDube 1 post
Popular Days
Mar 3 2021
2 posts
Mar 2 2021
1 post
Posted Images
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment