How to Add Smooth Scrolling Anchor Links to Jump to a Specific Part of a Web Page - HTML & CSS

preview_player
Показать описание
In this tutorial, you'll learn how to scroll up or down a website using an anchor link with CSS only.

Sponsor me on GitHub!

Follow my blog:

Рекомендации по теме
Комментарии
Автор

Great video quick and right to the point, super helpful!

lolvideoscallofduty
Автор

Thank you so much for this short trick which I was searching in whole YouTube but couldn't get it. For you I am able to complete my work now!!!🤗

sadathossain
Автор

Inshort
give an id to the specific part of your page that you wanna scroll to for eg- <section id= "contact">...<section>
then in the anchor tag do this <a href="#contact">About</a>
and also in the css file do this html{ scroll-behavior: smooth; }

hope this helps

proCodeOfficial
Автор

Thank You! You didn't waste a lot of time and provided the solution quickly. Thanks again :)

hellocoding
Автор

Great video just right to solution, no trash talking, no promotions..
Good Work 👍👍

devashishroychowdhury
Автор

Thank you for a quick video 🙏 Bless you and your CSS wizardry

rachelmiller
Автор

So much easier than I thought! Thanks for the helpful & concise video! I appreciate it 👊

lostsunrises
Автор

I rarely comments on people's video even though they did help me, but on this one I will definitely do so! Thanks again for your help!

RealTimeTech
Автор

I would´ve never thought how easy it is. Thank you for sharing your knowledge with us.

reggt
Автор

Amazing Video, straight to the point, and no bs, thank you so much for this 🔥🔥

joybrar
Автор

That was awesome! Thank you so much. Liked & Subscribed!
Looking for more of your tutorials.

EbdaAcademy
Автор

You should put the code in the description, but ya know the video was good ig then again having it in the description would help

Reactivity
Автор

wow thank you. So simple but it took 4 videos to find a simple one like this

PatTheRipper
Автор

this is not working, when I click on any of the navigation options it doesn't have a smooth scroll. please help

spendings
Автор

Omg, You are a genius, thank you very much, everything turned out to be so easy and simple. Thanks a lot

helloiveqw
Автор

Thank you so much it works like a charm!

IJP
Автор

it works!

for any noobs like me, just make sure you add the CSS part into the <head> section of the HTML. like this:

<head>
<style>
h1 {
color: black;
font-size: 30px;
margin-top: 100px;
background-color: inherit;
text-align: center;
}

html {
scroll-behavior: smooth;
}
</style>
</head>

Raidoven
Автор

helpful and straight to the point. thanks!

andrewdalbey
Автор

This is soooo much simple that in javascript thank you

glazed.
Автор

awesome video, i could not hope for better explanations. you earned a subscriber

davesker