Keep Footer at the Bottom of the Page: HTML & CSS (2024)

  Рет қаралды 2,595

Dmitry Mayorov

Dmitry Mayorov

Күн бұрын

Keep the footer at the bottom of the page, even on pages with minimal content. In this video, we tackle the popular layout challenge of keeping the footer at the bottom of the page, using CSS grid and dynamic viewport units for a sturdy solution, especially on mobile devices where the page height can vary as users scroll.
CodePen: codepen.io/dmtrmrv/pen/NWmxbPx
Chapters:
00:00 - Introduction
00:27 - HTML Structure
00:54 - CSS Walkthrough
01:12 - CSS: Dynamic Viewport Height
01:38 - CSS: Implementing CSS Grid
02:03 - Reminder to Set Columns
02:25 - Avoid Setting 100% Height on HTML and Body
03:24 - Wrap-Up

Пікірлер: 20
@alexmacol228
@alexmacol228 10 күн бұрын
Thank you!!! Again another great explanation!
@dmtrmrv
@dmtrmrv 10 күн бұрын
My pleasure! Glad you found it helpful!
@Kiichyy
@Kiichyy 2 ай бұрын
you're such a hero for me. thank you!
@dmtrmrv
@dmtrmrv 2 ай бұрын
Thank you so much for your kind words! I'm really glad you found the video helpful. Calling me a hero might be a bit much, but I'm just happy to share what I know and help fellow engineers. If you have any other topics or tricks you're curious about, feel free to let me know. Thanks again for your support!
@Kiichyy
@Kiichyy 2 ай бұрын
@@dmtrmrv It would be great if you could talk more about Grid and its measurements!
@dmtrmrv
@dmtrmrv Ай бұрын
@Kiichyy, thank you for the suggestion. I'll definitely look into it. Please feel free to write any specific questions or share what you're struggling with.
@wobsoriano
@wobsoriano Ай бұрын
New subscriber here and loving your content!
@dmtrmrv
@dmtrmrv Ай бұрын
Welcome aboard!
@ahmedahmedx9600
@ahmedahmedx9600 Ай бұрын
Damn thats a blessing, im always facing this problem and i find your video, thank you very much sir, please make more videos like this
@dmtrmrv
@dmtrmrv Ай бұрын
Thank you for the kind words!
@as.abdulazeem
@as.abdulazeem Ай бұрын
Thanks for this, my take home home here is the minmax you used on the grid columns and the reason why. I am anticipating your solution on the sticky to check with mine, once one, thanks.
@dmtrmrv
@dmtrmrv Ай бұрын
That’s right! minmax(0, 1fr) does all the magic in combination with 100dvh.
@je9625
@je9625 Ай бұрын
This is a very good video and introduces a lot of best practices. I would suggest you make a video creating a website that incorporates and explains these practices. Good job, you just gained a subscriber.
@dmtrmrv
@dmtrmrv Ай бұрын
Thank you and welcome! That's an excellent suggestion, and I completely agree. It's already planned, but it's a bigger project, and requires some time, but I will definitely create one this year. I'm curious to know, what type of website would you like to see built? An app, a magazine, a portfolio, or something else?
@douvogiannisgeorge
@douvogiannisgeorge Ай бұрын
i like your videos because its to the point, keep upp like this :)
@dmtrmrv
@dmtrmrv Ай бұрын
Thank you! I'm happy to hear that because that's one of my goals with this channel. Keeping the videos informative and short.
@AmazingCreationsStudio
@AmazingCreationsStudio Ай бұрын
nice content .. please bring more SECRET contents like this.. why SECRET ? well let me tell you.. " only a few people around the world brings this kind of important content "
@dmtrmrv
@dmtrmrv Ай бұрын
Thank you! I'll see what I can do :)
@Danielo515
@Danielo515 Ай бұрын
How portable is this? Because if it only works in 90% of mobile devices, it is not good enough
@dmtrmrv
@dmtrmrv Ай бұрын
The latest feature in the video is the "dvh" units, which currently enjoy decent support. However, it's always better to review the analytics of the current project to understand the devices from which users are accessing it.
The problems with viewport units
13:23
Kevin Powell
Рет қаралды 349 М.
Learn CSS BEM (and avoid these common mistakes)
15:36
Dmitry Mayorov
Рет қаралды 3,9 М.
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Рет қаралды 24 МЛН
ОДИН ДОМА #shorts
00:34
Паша Осадчий
Рет қаралды 4,2 МЛН
Зу-зу Күлпәш. Стоп. (1-бөлім)
52:33
ASTANATV Movie
Рет қаралды 244 М.
Learn CSS Positioning Quickly With A Real World Example
8:32
Slaying The Dragon
Рет қаралды 546 М.
CSS Tips And Tricks 2 | I Wish Somebody Told Me Before
12:36
Lama Dev
Рет қаралды 35 М.
Create a Sticky Header with HTML & CSS: A Step-by-Step Tutorial
6:07
Dmitry Mayorov
Рет қаралды 1,1 М.
CSS Subgrid Layouts Are Here!
9:09
Dmitry Mayorov
Рет қаралды 5 М.
Create a diamond grid with CSS (with a bonus animation)
26:03
Kevin Powell
Рет қаралды 42 М.
How to take control of Flexbox
16:01
Kevin Powell
Рет қаралды 73 М.
So You Think You Know Git Part 2 - DevWorld 2024
23:02
GitButler
Рет қаралды 62 М.
Animate nav on scroll - CSS-only & easy to customize
26:52
Kevin Powell
Рет қаралды 43 М.
Is Mobile-First Design Still Relevant in 2024?
6:53
Dmitry Mayorov
Рет қаралды 1,5 М.
Incredible scroll-based animations with CSS-only
32:23
Kevin Powell
Рет қаралды 311 М.
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Рет қаралды 24 МЛН