Sticky Footer in React (Best Solution)

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024

ความคิดเห็น • 60

  • @xandygameryt
    @xandygameryt 6 หลายเดือนก่อน +1

    You saved me thanks.. I'm starting with React and couldn't make and didn't think it was that easy, I did all these mistakes except for calc() and nothing worked, then tried the first one and worked just fine.

  • @prpunk787
    @prpunk787 ปีที่แล้ว +4

    bro, the satisfaction I felt when I set margin-top: auto; and that footer stuck to the botton was indescribable. Thank you!! I had solved this issue in another way but when the view port was tiny the footer would take the entire page because the position was fixed.

  • @arhabersham
    @arhabersham 7 หลายเดือนก่อน +3

    These solutions seem simple, but take so darn long to solve/figure out! Thanks for sharing 🙏

  • @gnuf666
    @gnuf666 3 หลายเดือนก่อน +1

    Normally I don’t comment… but this time I wanna say just „thank you“ for the clean solution and the calm, simple and good explanation of the mechanism behind it. 👍

  • @juanhedderich
    @juanhedderich ปีที่แล้ว +5

    THANK YOU SO MUCH, I love that u actually explained the fundamentals behind it, the most important aspects were:
    margin-top: auto
    and getting the parent element to have flexbox
    Ty sir!!

  • @dgeneral12
    @dgeneral12 8 วันที่ผ่านมา +1

    thank you so much i spent hours on this but you explained it really well enough for me to understand and implement it in my website

  • @colinmarshall6634
    @colinmarshall6634 ปีที่แล้ว +1

    This worked perfectly for me! If you're using Tailwind to build a React app: set the parent div to `className="min-h-screen flex flex-col"` and your footer div to `className="mt-auto"`. Does the same thing as doing this in standard CSS.

  • @aNDy-qh1em
    @aNDy-qh1em 20 วันที่ผ่านมา +1

    Thank you Wesley, you've made my day!. Subscribed.

  • @ByteGrad
    @ByteGrad  2 ปีที่แล้ว

    Hi, mastering JavaScript is critical if you want to be a modern, professional developer: www.udemy.com/course/professional-javascript-course/?referralCode=0C1D5752923168BC87C2
    Also, if you are a front-end developer then mastering CSS (including Flexbox, CSS Grid, etc.) is equally important: www.udemy.com/course/professional-css/?referralCode=4C3C08E82629E6B15752

  • @kfirlankry6319
    @kfirlankry6319 ปีที่แล้ว +2

    wow! been looking this solution for months!! got lots of ways but all of them were horrible! Thank u !

  • @1armenn
    @1armenn ปีที่แล้ว +1

    Wow the only video that actually made sense and worked. Thank you!

  • @Harpie.
    @Harpie. ปีที่แล้ว +1

    I was trying to keep any html out of my app jsx file but it worked out fine once all of the CSS was situated. I just had to delete the text-align:center, because it shifted everything on the page that I didn't want centered. Thanks for the tutorial!

  • @GiacomoCasoloDigitalConsultant
    @GiacomoCasoloDigitalConsultant ปีที่แล้ว +1

    Thanks for this super video! Unfortunately I'm still struggling with the footer position..my app is wrapped with routes and theme provider and using routes I don't have Footer component in my app.js. I tried to follow your instructions wrapping all the app.js in a div container and giving css rules to the container in app.css and to the Footer in footer.css but didn't work..any suggestions? Thanks in advance!

  • @srinivasnahak3473
    @srinivasnahak3473 11 หลายเดือนก่อน +1

    Thank you so much... most efficient solution ever!!

  • @Martin-qy3mm
    @Martin-qy3mm ปีที่แล้ว +1

    Thank you, I wish I found this video earlier, great explanation and solves the problem perfectly.

  • @mister-bham
    @mister-bham 9 หลายเดือนก่อน +1

    Thank you!!! ❤
    Love your videos, very appreciative!

  • @utkarshsharma1185
    @utkarshsharma1185 ปีที่แล้ว +2

    thanks, brother you really helped me.

  • @simpliside
    @simpliside 3 หลายเดือนก่อน +1

    You are great at this

  • @abzz1290
    @abzz1290 5 หลายเดือนก่อน +1

    Thanks my issue resolved :)

  • @matheusschelbauer9076
    @matheusschelbauer9076 29 วันที่ผ่านมา +1

    Thank you!

  • @GabrielLima-sg6pn
    @GabrielLima-sg6pn ปีที่แล้ว +1

    clearly, the best solution of course! Thanks, worked for me!!

  • @thevishingh
    @thevishingh ปีที่แล้ว +1

    it's 3:30 Am in India And i was searching for the solution of my problem And i found Your video , Thanks A Lot sir...!! 🙏🏻🙏🏻🙏🏻

  • @theonlymaster9374
    @theonlymaster9374 2 หลายเดือนก่อน

    this solution, is good, i was doing it on my own, and what happend is that i had not imported the css file for the footer component,
    i changed the css some 110-15 times, did hard refresh, tried to see what was the error
    my goodness, i couldn't see the eror at all
    i took days to see tht i forgot to import the css that needs to be added 🤦‍♂🤦‍♂

  • @Arthuthu
    @Arthuthu 5 หลายเดือนก่อน

    Very helpful, thank you man

  • @VIV1Do
    @VIV1Do ปีที่แล้ว +2

    Oh god. you have no idea how much time i have spend on this problem... no one answered it that simple

  • @seb.z.g
    @seb.z.g 9 หลายเดือนก่อน +1

    Thank you! 🙌

  • @funckialexjoly262
    @funckialexjoly262 ปีที่แล้ว +1

    Thank you so much ! Please continue to amaze this world

  • @stanislavus
    @stanislavus ปีที่แล้ว +1

    thank you for in-depth explanation and clean solution! 😀

  • @NoumanKhan-hb5oi
    @NoumanKhan-hb5oi 7 หลายเดือนก่อน +1

    thanx for this brother

  • @nskiran4892
    @nskiran4892 9 หลายเดือนก่อน +1

    Thank you.. it helped me..

  • @edboss36
    @edboss36 ปีที่แล้ว

    Hey my friend, do you know how to make a component stick to the bottom of a page but always be visible when scrolling?

    • @ByteGrad
      @ByteGrad  ปีที่แล้ว

      Try:
      position: fixed;
      bottom: 0;

  • @andytruong-dl6mb
    @andytruong-dl6mb ปีที่แล้ว +1

    1:30 made so much sense

  • @ebbmango
    @ebbmango 7 หลายเดือนก่อน +1

    Thank you very much!

  • @ShibaramDas-ue4io
    @ShibaramDas-ue4io 5 หลายเดือนก่อน +1

    Thank you sir.

  • @pmshadow
    @pmshadow ปีที่แล้ว +1

    wow, perfect explanation! Thank you very much!

  • @lukejohnsx360
    @lukejohnsx360 ปีที่แล้ว +1

    You dropped this crown👑 King. Thank you.

  • @GrowsDrummer
    @GrowsDrummer ปีที่แล้ว +1

    Thanks, this solution is perfect.

  • @Minniemousie-v5w
    @Minniemousie-v5w 7 หลายเดือนก่อน +1

    What if we have a footer.jsx file ? How can we make it sticky ?

  • @Deric_Rocks
    @Deric_Rocks ปีที่แล้ว +1

    What a great and concise video this is! Thank you!

  • @SignE96
    @SignE96 10 หลายเดือนก่อน +1

    saved my finals omg

  • @okkotsugg
    @okkotsugg ปีที่แล้ว +1

    Tnank you ! This video helped me A LOT !

  • @chrissame
    @chrissame ปีที่แล้ว

    I totally get it now. The video was helpful however it has not worked for me and I am sure it is some sort of css issue but I have no idea how to fix it :(

  • @TheSoulCrisis
    @TheSoulCrisis ปีที่แล้ว +1

    Thanks for the cool tutorial!

  • @ИванТюрин-д9ф
    @ИванТюрин-д9ф ปีที่แล้ว +1

    Thank you very much!

  • @actechbadhabits
    @actechbadhabits 10 หลายเดือนก่อน +1

    Thankuuuu

  • @piyushbora4763
    @piyushbora4763 ปีที่แล้ว

    how to also stick the navbar at the top?

    • @ByteGrad
      @ByteGrad  ปีที่แล้ว

      Try position: fixed for navbar

  • @valdompinga
    @valdompinga ปีที่แล้ว +1

    u saved my day, ty!

  • @sumanmaji4618
    @sumanmaji4618 ปีที่แล้ว +1

    Thank u, thank u so much man

  • @sikanderisure
    @sikanderisure 11 หลายเดือนก่อน

    Code?

  • @phantazzor
    @phantazzor 2 หลายเดือนก่อน

    grid-row(auto 1fr auto)

  • @svitak1987
    @svitak1987 2 หลายเดือนก่อน +1

    I found it!!! Cheesus!!!

  • @ParasProgramming123
    @ParasProgramming123 ปีที่แล้ว

    thanks for this helped a lot

  • @themagickalmagickman
    @themagickalmagickman ปีที่แล้ว +1

    Thanks!

  • @arshad1781
    @arshad1781 2 ปีที่แล้ว +1

    Thanks

  • @VworksArt
    @VworksArt ปีที่แล้ว +1

    I need to burn this into my memory.

  • @tichaa
    @tichaa 5 หลายเดือนก่อน

    Very efficient solution @ByteGrad

  • @prpunk787
    @prpunk787 ปีที่แล้ว

    bro, the satisfaction I felt when I set margin-top: auto; and that footer stuck to the botton was indescribable. Thank you!! I had solved this issue in another way but when the view port was tiny the footer would take the entire page because the position was fixed.