Keeping Footer at the Bottom of the Page (HTML & CSS)

Поделиться
HTML-код
  • Опубликовано: 2 июн 2024
  • Learn how to keep the footer at the bottom of the page, even if the content above it is too short to naturally push it to the bottom, using CSS.
    First, the case where the footer will always be positioned at the bottom of the page, but not fixed, will be examined, followed by the case of a fixed (sticky) footer at the bottom of the page.
    Code for this Project: codepen.io/Coding_Journey/pen...
    Support the Channel 💙☕🙏
    PayPal: paypal.me/CodingJourney
    Suggested Videos:
    Card Flip Effect (HTML & CSS): • Card Flip Effect (HTML...
    Back to Top Button with HTML, CSS and JavaScript: • Back to Top Button wit...
    Colorful Background with linear-gradient: • Colorful Background wi...
    Currency Converter with HTML, CSS and JavaScript: • Currency Converter wit...
    Font Awesome 5 Icons: • Font Awesome 5 Icons
    Thanks for watching! For any questions, suggestions or just to say hi, please use the comment section below!
    Codepen: codepen.io/Coding_Journey/
    Twitter: / codingjrney
    Email: codingjourney123@gmail.com
    Subscribe 💖
    / @codingjourney

Комментарии • 295

  • @stevebdevn8942
    @stevebdevn8942 4 года назад +12

    Awesome Tut! Thanks for covering multiple options, especially the sticky footer. Also, thanks for mentioning the Js snippet for automatic date updating! That's so handy!!

    • @CodingJourney
      @CodingJourney  4 года назад

      Amazing! Thank you for the nice words 🙂 Very glad you liked it!!

  • @heatherfarnham3185
    @heatherfarnham3185 2 года назад +2

    The first option works perfectly with long single page sites in all responsive breakpoints. Thank you so much!

  • @chidoan7153
    @chidoan7153 2 года назад +17

    Hands down the best solution for this problem! Thank you for ending my 3 hours of searching endlessly!

    • @CodingJourney
      @CodingJourney  2 года назад +3

      Super! You can now proceed to solving the next problem 😉 All the best, keep coding 💙

    • @droneadventures.731
      @droneadventures.731 2 года назад +4

      same here, even more hours :)

  • @kbsiva
    @kbsiva 3 года назад +4

    Thank you! It's wonderful what a few bits of well written CSS can do. Love it.

  • @RANKKY9
    @RANKKY9 4 года назад +27

    solution: 6:32

  • @LunchBox77
    @LunchBox77 Год назад +6

    Great tutorial, one of the best and most straight to the point I have seen.

  • @CWhitmer22015
    @CWhitmer22015 3 года назад +1

    Thanks for making the video. Very simple and to the point. I like the aside about the jscript for the year.
    Keep the videos coming, it is appreciated.

    • @CodingJourney
      @CodingJourney  3 года назад

      Oh thank you for the lovely comment 🙂 Very glad you liked it! I will 😉 Take care!!

  • @user-cq1ss3jy8i
    @user-cq1ss3jy8i 5 лет назад +1

    Perfect tutorial, helped out tremendously! Thanks a lot!

  • @mrfritz9901
    @mrfritz9901 Год назад +1

    thanks -- the padding-bottom on body really helped me.

  • @mihirkumarchoudhury5489
    @mihirkumarchoudhury5489 4 года назад +10

    Superb man! After watching almost 15 videos I landed here and to be honest it was totally worth it. Brilliant

    • @CodingJourney
      @CodingJourney  4 года назад +3

      Oh thank you for the lovely comment!! Very glad you found this useful 🙂

    • @Roberto-ep5qd
      @Roberto-ep5qd 3 года назад +1

      ​@@CodingJourney You're a genius... Thanks so much for sharing us this video. (Sorry for my bad english)

    • @CodingJourney
      @CodingJourney  3 года назад

      @@Roberto-ep5qd Oh thanks man! Very glad you like it 🙂 Keep coding!! 😉💙

  • @murtazamohseni4382
    @murtazamohseni4382 4 года назад +1

    I really learnt something which other front end ytubers haven't mentioned thanks and keep growing;) GL

    • @CodingJourney
      @CodingJourney  4 года назад

      Very glad to hear that mate! Thanks for the lovely comment 🙂 You too, all the best!!!

  • @cristianmitu592
    @cristianmitu592 Год назад +1

    Amazing approach, thank you!

  • @vishalpawar1366
    @vishalpawar1366 2 года назад +1

    got exact what Im looking for Awesome

  • @sobrecoxadealface6745
    @sobrecoxadealface6745 3 года назад +4

    Incredible how fast and efficiently you can make a good looking web page! btw thx you helped me so much

    • @CodingJourney
      @CodingJourney  3 года назад

      My pleasure 🙂 Very happy to hear that!! 💙

  • @codebuster2716
    @codebuster2716 2 месяца назад

    Excellent video!! Thank you.

  • @alexandruboscu5094
    @alexandruboscu5094 3 года назад +1

    I'm searching for this kind of video to resolve my problem with footer not sticking at the bottom for almost 3h, thanks man, you're great!!!

    • @CodingJourney
      @CodingJourney  3 года назад +1

      Oh thank you for the lovely message 🙏🙂 Very glad it helped! 💙

  • @Tony-pe3kp
    @Tony-pe3kp 5 лет назад

    Nice and clear as usual. THANKS!!

  • @TuyaTheNasty
    @TuyaTheNasty 2 года назад +1

    Saved me twice. Thank You and have my sub! :D

    • @CodingJourney
      @CodingJourney  2 года назад

      Heh 😉 Thanks mate, welcome aboard! 💙💙

  • @derabelconcepts1250
    @derabelconcepts1250 Год назад +1

    Seriously bruh, thanks best Tutorial ever, thanks for ending my 4 hour long search , God bless, you have my subscribe and like for sure 😁

    • @CodingJourney
      @CodingJourney  Год назад

      Thanks mate! Huge love, keep coding! 🙂💙

  • @abdifatahmoh
    @abdifatahmoh 5 лет назад

    You saved my life, thanks!

  • @Vanille-ny7ln
    @Vanille-ny7ln 2 года назад +1

    Thank you so much! Very helpful.

  •  Год назад +1

    Thank you genius! I was trying to place my footer and this was the best solution for my project.

    • @CodingJourney
      @CodingJourney  Год назад +1

      Amazing! Glad this was helpful. All the best, keep coding!! 💙

  • @simongamer7288
    @simongamer7288 2 года назад +1

    Worked very well, thanks God bless u

  • @andrewamentojr
    @andrewamentojr Год назад +1

    Excellent video learned alot thank you!

  • @BicospaceTech
    @BicospaceTech Год назад +1

    you are gold man

  • @sebastiancuatepotzo3181
    @sebastiancuatepotzo3181 4 года назад

    this video is awe, it explain a lot in a clear way, thank you man

    • @CodingJourney
      @CodingJourney  4 года назад

      Thank you for the lovely comment 🙂 Glad you liked it!!

  • @muteebakram37
    @muteebakram37 2 года назад +1

    Thank you man. This helped me.

  • @danieldelfresno
    @danieldelfresno 4 года назад

    Thanks a lot man! Some information in this one, made all the difference here!

    • @CodingJourney
      @CodingJourney  4 года назад

      Amazing mate, very glad you liked it!! The "that made all the difference" reminded me one of my favorite poems..."The road not taken" 🙂😉

  • @kamaralam1056
    @kamaralam1056 Год назад +1

    This is the video I'm looking for thank you so much 👍

  • @_vikramhegde_
    @_vikramhegde_ 5 лет назад

    Very cool... Well explained 👍👏.. Look forward to more tips from this channel

  • @kinoko1493
    @kinoko1493 2 года назад +1

    thank u 100000x times u got a new loyal subscriber

    • @CodingJourney
      @CodingJourney  2 года назад

      Heh totally my pleasure 🙂 Welcome aboard!! Keep coding and enjoy the journey 🙂💙💙

  • @saimasalamat2187
    @saimasalamat2187 4 года назад

    Thank You so much you sort out my problem of footer

  • @wendersonfernandes530
    @wendersonfernandes530 4 года назад

    You are a lifesaver!!!!
    thanks from Brazil!

    • @CodingJourney
      @CodingJourney  4 года назад

      Heh! Amazing, very glad it helped 🙂 My warmest greetings to Brazil!! 🙂

  • @segsfault
    @segsfault 3 года назад +3

    Thank you so much i was finding this all day

  • @Kittycat1986abc
    @Kittycat1986abc 4 года назад +2

    Thank you you're a lifesaver!

    • @CodingJourney
      @CodingJourney  4 года назад

      I'm just a web developer 🙂 But very glad to hear you found this useful!!

  • @adriancelis9691
    @adriancelis9691 4 года назад +1

    This is awesome. Thank you!

    • @CodingJourney
      @CodingJourney  4 года назад +1

      Amazing! Very glad you liked it!! 🙂

  • @Godisbetter909
    @Godisbetter909 3 года назад +1

    Very simple when you explain , thanks!

    • @CodingJourney
      @CodingJourney  3 года назад +1

      Thank you! Very glad it was helpful! 💙🙂

  • @RN-ru2rj
    @RN-ru2rj 2 года назад +1

    Thank you so much. You are awesome. 🙌

    • @CodingJourney
      @CodingJourney  2 года назад

      You are 😉 Glad you liked it, my pleasure!!

  • @anandita166
    @anandita166 3 года назад +1

    Soo helpful! I've been stuck at this the whole day, thank-you!!!!

    • @CodingJourney
      @CodingJourney  3 года назад +2

      My pleasure! Very glad it helped 🙂

    • @JJSfromCHI
      @JJSfromCHI 3 года назад +1

      Honestly. Knowing that it’s a footer it should automatically stay at the bottom without having to use a fixed position 😩

    • @CodingJourney
      @CodingJourney  3 года назад +2

      @@JJSfromCHI Heh! Yeap, would be nice if this was the default behavior 🙂

    • @anandita166
      @anandita166 3 года назад +1

      @@JJSfromCHI yup that's unfortunate and annoying 🥴

  • @lyntechi4440
    @lyntechi4440 3 года назад +2

    Wow seriously thank you so much. i couldnt figure out why my footer kept moving around everywhere each time my content size went down.

    • @CodingJourney
      @CodingJourney  3 года назад

      🙂 My pleasure! Very glad to hear that this helped! All the best, keep coding 😉

  • @osminmedrano6466
    @osminmedrano6466 3 года назад +1

    Thaanks bro!
    from Costa Rica!♥

    • @CodingJourney
      @CodingJourney  3 года назад

      My pleasure!! 🙂 Warm greetings to Costa Rica 💙💙

  • @chinwokenwafor871
    @chinwokenwafor871 3 года назад +1

    Thank you so much for this video!

    • @CodingJourney
      @CodingJourney  3 года назад

      My pleasure 🙂 Very glad it was helpful!!

  • @chocobroodje
    @chocobroodje 4 года назад

    Thank you so much man. This helped me so well and was really clear.

    • @CodingJourney
      @CodingJourney  4 года назад

      Amazing! Very glad you found this useful. Thanks for the lovely comment 🙂

  • @priyamganguly
    @priyamganguly 3 года назад +1

    Footers are really very stubborn to control. Thank you for taking time to make this video. It made my task very easy.

    • @CodingJourney
      @CodingJourney  3 года назад

      Amazing! My pleasure, very glad it helped 😉💙

  • @lobsangbarriga5324
    @lobsangbarriga5324 4 года назад +1

    Thanks man!! So useful!

  • @GuilhermeTeixeira
    @GuilhermeTeixeira 3 года назад +1

    You helped me a lot. Thank you so much!

    • @CodingJourney
      @CodingJourney  3 года назад +1

      My pleasure 🙂 Very glad to hear that! Keep coding 😉

  • @whiterappersworstenemy5773
    @whiterappersworstenemy5773 Год назад

    Thanks very much! :)

  • @rauljrperemne1924
    @rauljrperemne1924 3 года назад +1

    Awesome! Thanks!

  • @Ipdxcreative
    @Ipdxcreative 4 года назад +1

    Dude thank you so much, this has been very helpful! I really appreciate it!

    • @CodingJourney
      @CodingJourney  4 года назад +1

      Amazing! Glad it helped 🙂 Just watched your home-made hand sanitizer video...I will definitely follow your instructions...don't have an orange though so I will use grapefruit instead, hope it still works 😉😁💙

    • @Ipdxcreative
      @Ipdxcreative 4 года назад +1

      @@CodingJourney oh it will! I forgot to mention it's primarily the citrus that does it 😂 how long you been programming for?

    • @CodingJourney
      @CodingJourney  4 года назад

      Heheh 😉🙂 Well I've been programming for a while...very specific I know 😂 Wrote my first line of code about 15 years ago but I've been in and out of programming...into web development the past 3 years or so 🙂

    • @Ipdxcreative
      @Ipdxcreative 4 года назад +1

      @@CodingJourney Thats awesome. Its been interesting to see how far people are along in their journey and where they want to go!

    • @CodingJourney
      @CodingJourney  4 года назад

      Indeed!! Also, coding community rocks 😁😉💙💙

  • @minhchauha891
    @minhchauha891 2 года назад +1

    you literally saved me, god bless u

  • @ayeslpirninsev
    @ayeslpirninsev 2 месяца назад

    Helped me alot thanks

  • @janiner2612
    @janiner2612 6 месяцев назад +1

    THANK YOU!!

  • @sethfrady9334
    @sethfrady9334 3 года назад +1

    You are amazing! Thank you!

    • @CodingJourney
      @CodingJourney  3 года назад

      You are! 😉 Very glad you liked it 🙂

  • @dtawantawng5131
    @dtawantawng5131 Год назад +1

    I like this approach. I always struggle with footer positioning, so I'm trying this in my current project that I just started. If it all works okay, I'll make this my go-to footer positioning method (:

    • @CodingJourney
      @CodingJourney  Год назад

      🤞🙂 All the best mate, keep coding!! 😉

  • @nullzero9224
    @nullzero9224 Год назад

    Excellent and well explained 👌 - Thanks

  • @alejandroszg
    @alejandroszg 3 года назад +2

    The solution with the calc it's AMAZING!

    • @CodingJourney
      @CodingJourney  3 года назад

      Thanks mate! So are you 😉 Keep coding!!

    • @braydonkolton292
      @braydonkolton292 3 года назад

      I realize it is pretty randomly asking but does anyone know a good site to stream new series online?

    • @zachariahmarcellus8456
      @zachariahmarcellus8456 3 года назад

      @Braydon Kolton try Flixzone. You can find it by googling :)

  • @pepelepoux9746
    @pepelepoux9746 4 года назад

    thank you so much ! This is so helpful !

  • @0508Anar
    @0508Anar 4 года назад

    Thanks Mate! That really helped me!

  • @rolandohaynes9093
    @rolandohaynes9093 5 лет назад

    Excellent, thanks!

  • @mbdAli
    @mbdAli 3 года назад +1

    It saved lots of time for me.

  • @bmm52824
    @bmm52824 5 лет назад

    Thank you so much sir! :D

  • @MudassirKhan-sx9jy
    @MudassirKhan-sx9jy 2 года назад +1

    Awesome💕💕

  • @Alex._ricardo
    @Alex._ricardo 4 года назад +1

    Great video! Thanks Bro :D

    • @CodingJourney
      @CodingJourney  4 года назад

      Amazing! Very glad you liked it 🙂💙

  • @emilandersen6865
    @emilandersen6865 4 года назад +1

    Thank you. Nice video

  • @Skavenscribe
    @Skavenscribe 4 года назад +1

    Thanks a lot for this tutorial, it was easy to follow and fun to learn. I like your style. It's relaxed and down to earth.

    • @CodingJourney
      @CodingJourney  4 года назад +1

      Oooh thank you for the nice words! Very glad you liked it :)

    • @Skavenscribe
      @Skavenscribe 4 года назад +1

      @@CodingJourney Not a problem mate. I was watching another tutorial about how to solve this issue with the footer, and they showed how to "push" it down to the bottom with content. I thought that was a pretty dodgy and unprofessional way of doing things. Your way is much better!

    • @CodingJourney
      @CodingJourney  4 года назад +1

      Thanks mate! Well, I'm doing my small research before each video trying to present the best solutions, according to my opinion of course :) And over time new ways of solving problems come up...for example if I made this video today, I would also probably present a solution using flexbox...things never get boring in web development ;)

    • @Skavenscribe
      @Skavenscribe 4 года назад +1

      @@CodingJourney Absolutely. Things are constantly evolving all the time and that's the fun part about it I think. I'll stay tuned for new videos!

  • @davebudah
    @davebudah 4 года назад

    Best explanation so far, thanks so much

  • @Azeuuu
    @Azeuuu 2 года назад +1

    Thanks dude!

  • @srinivaspatnala696
    @srinivaspatnala696 4 года назад

    thank you so much man, it works for me

    • @CodingJourney
      @CodingJourney  4 года назад

      Amazing mate!! Very happy to hear that 🙂

  • @motivatedbusiness1
    @motivatedbusiness1 Год назад +1

    Thanks, Developer great Help.

  • @otnielotniel8455
    @otnielotniel8455 4 года назад +1

    I really appreciate, thank you. I'd like that you do a video to explain the position of the articles and sections within the main of the page

    • @CodingJourney
      @CodingJourney  4 года назад

      Very glad you liked it 🙂 Nice suggestion, thanks! I currently have many many things lined-up though so I'm quite certain that by the time I will be able to upload such a video you will already be able to create all sorts of layouts!! 😉🙂

  • @maazalikhan8765
    @maazalikhan8765 3 года назад +1

    thanks a lot, man you probably save my job!

    • @CodingJourney
      @CodingJourney  3 года назад

      Hahah! Googling and searching for solutions is part of the job, so you saved it 😉💙

  • @marksiely4747
    @marksiely4747 2 года назад +1

    This is the best tutorial concerning this subject. This has work for me, thanks to your style of teaching. One question, I see you don't put # in your css before body, headder, footer etc. Is this because you are using html5 and the others don't ? Thank you very much in advance!

    • @CodingJourney
      @CodingJourney  2 года назад +2

      Hey thanks, glad you found this useful 🙂 Regarding your question, nope this has nothing to do with HTML5 (which btw I guess that's what others are using as well since it has already been around for about a decade). This has to do with "CSS selectors" or in other words how we can select HTML elements to style with CSS. "#" is used as an id selector, e.g. to select an element with id="footer", we would use the #footer selector. But in our case we are using the HTML tag, which we can simply select using footer (element selector). For more info you can google/search for "CSS selectors"! All the best, keep coding 😉💙

  • @AA-em3lw
    @AA-em3lw 3 года назад +1

    You are amazing

    • @CodingJourney
      @CodingJourney  3 года назад

      Yes you are!! 😉🙂 Thanks mate 💙

  • @caca97ful
    @caca97ful 2 года назад +1

    Thanks!!

  • @Theactualgamer1
    @Theactualgamer1 3 года назад +1

    Really good video. Very professional

    • @CodingJourney
      @CodingJourney  3 года назад

      Oh thank you 🙂 Very glad you liked it!

  • @kaanhan7842
    @kaanhan7842 3 года назад +1

    Thank you so much 👍

    • @CodingJourney
      @CodingJourney  3 года назад

      My pleasure! Glad you liked it!! 💙

  • @shifalirajput2597
    @shifalirajput2597 Год назад +1

    Thankyou !

  • @anthonyarguello9490
    @anthonyarguello9490 4 года назад +1

    Thanks man!

  • @pedrol6193
    @pedrol6193 10 месяцев назад

    awesome video

  • @jilalabderezake8231
    @jilalabderezake8231 3 года назад +1

    bravo bro best and beautiful work

    • @CodingJourney
      @CodingJourney  3 года назад

      Oh thanks bro, very glad you liked it!! Keep coding 😉

  • @codewithkaran8860
    @codewithkaran8860 2 года назад +1

    Great content 👌

  • @adityadighe1582
    @adityadighe1582 4 года назад +1

    very nice job sir !! You have been of great help !!! Thank you !! best wishes to you !!

    • @CodingJourney
      @CodingJourney  4 года назад +1

      Ooooh thank you for the nice words 🙏 Very glad it helped! U2, all the best!!

    • @adityadighe1582
      @adityadighe1582 4 года назад +1

      @@CodingJourney Sir I am currently looking for job hopefully I shall get it soon.

    • @CodingJourney
      @CodingJourney  4 года назад +1

      @@adityadighe1582 Good luck!! Keep trying and improving your skills and it will happen!

  • @fitzladams
    @fitzladams 3 года назад +1

    Thank you very much.

  • @risheknarayan1450
    @risheknarayan1450 3 года назад +1

    Love you bro

  • @rohitbabu5162
    @rohitbabu5162 2 года назад +1

    Thanks a lot

  • @ramneetkaur4902
    @ramneetkaur4902 4 года назад

    perfect one :) thanks for sharing

    • @CodingJourney
      @CodingJourney  4 года назад

      Excellent, thanks!! Glad you liked it 🙂

  • @poojamann5394
    @poojamann5394 Год назад

    You are superb 👌

  • @lidipm8748
    @lidipm8748 Год назад +1

    Great explanation 👌 Thank you for sharing it

    • @CodingJourney
      @CodingJourney  Год назад +1

      Totally my pleasure! Glad you found this useful!! Keep coding 😉💙

    • @lidipm8748
      @lidipm8748 Год назад +1

      ​@@CodingJourney It really is 👌 🤗 thanks!

  • @yawaboagye2436
    @yawaboagye2436 Год назад +1

    Thank you

  • @aniemmanuel3160
    @aniemmanuel3160 3 года назад +1

    Made my day easy

    • @CodingJourney
      @CodingJourney  3 года назад

      Very glad to hear that 🙂 Made my day better 😉💙

  • @mariyam823
    @mariyam823 2 года назад +1

    Thank you so muchhh 🥺 Day after tommorow I have practical exam and I need to make a website in 45 mins
    It was so helpful 👍

    • @CodingJourney
      @CodingJourney  2 года назад

      My pleasure, very glad this was helpful! All the best to your exam 💙 P.S. don't just watch videos, but code along and at some point try to create stuff from scratch on you own!!

    • @mariyam823
      @mariyam823 2 года назад

      @@CodingJourney yeah I tried in my own code at the same time and the second method worked so I commented... The calc function didn't work..

    • @mariyam823
      @mariyam823 2 года назад

      @@CodingJourney And Thank You So Much💫

  • @kratvol
    @kratvol Год назад +1

    thanks 4 video

  • @sagarchhetri6147
    @sagarchhetri6147 4 года назад +1

    thank you it helped :)

  • @sbmahapatra
    @sbmahapatra 2 года назад

    Thank you for the nice video. How can we make the header, main and footer responsive?

  • @adithyaparupudi1336
    @adithyaparupudi1336 3 года назад +1

    thank you so much!!!

    • @CodingJourney
      @CodingJourney  3 года назад

      My pleasure!! Very glad it helped 🙂

  • @noxdralock6293
    @noxdralock6293 4 года назад +1

    Really well explained ! Thank you for this vid, you saved me on this one ;)

    • @CodingJourney
      @CodingJourney  4 года назад

      Ooooh very glad to hear that!! 🙂 My pleasure 🙂

  • @fatimahmath4819
    @fatimahmath4819 Год назад +1

    Thank you very much

  • @CG-om1fv
    @CG-om1fv 4 года назад

    Thanks!

  • @yokohibarashi1386
    @yokohibarashi1386 3 года назад +1

    Still the best tutorial on this very annoying thing! thanks.

  • @fahimaltnordu2962
    @fahimaltnordu2962 3 года назад +1

    thank you