Комментарии:
absolute legend
ОтветитьWhat are the circumstances where this will not work? I’m usually trying a few centering mechanisms and don’t fully understand why sometimes some work and other times they don’t.
ОтветитьThank you Kevin❤
Ответитьthank u vro
ОтветитьThat's a great great explanation, thank you sir
Ответитьthanks!
ОтветитьThank you
ОтветитьPOV: You are an intern
ОтветитьAbsolutely beautiful. Chef's kiss brother
Ответитьput a div, then set your css to
}width: 800px OR width: 90%
margin-right: auto;
margin-left: auto;
}
done
thank you so much
Ответитьthanks
ОтветитьVery interesting video!
Ответитьwhy have you take width of 600px
Ответитьgood job thank you for the lesson
Ответитьyou explained it so well. really appreciate it. thank you Kevin!
ОтветитьWhy would you want a max width, though? Some people have really wide screens Why not allow the container to increase to 70% of any screen?
ОтветитьThank you for being straight and to the point.
And not spending too much time to get to the point.
Many thanks for that.
creating my blog. thank youuu
ОтветитьIs this still relevant? Are there more ways to achieve the same result
ОтветитьHow to center div exactly at the center of the webpage having space from top, bottom, left, and right sides?
I'm still learning CSS. I use margin to center a div like
.container{
margin-left: 500px;
margin-top: 150px;
}
On desktop it works almost perfectly but on mobile device and iPad, div goes to right and start overflowing and whitespace.
Kindly, tell me how can I center any div professionally?
Thank you for this video.
But sir how to select the right percentage value?
ОтветитьTHIS.
ОтветитьI read this title as "How to Center a div: part 20"
Ответить<center></center>
Ответитьgreat explanation as usual, you could add padding to the container so the text inside the div aligns better
thank you
your desktop background belongs on r/restofthefuckingowl. Your tutorials, however, do not.
ОтветитьThanks @Kevin Powell , nice video on colors in CSS ,this series is very much helpful .
ОтветитьThis is frustrating because I wraped all code inside body into a div, set its class to container, styled it to margin 0 auto and nothing happens. Same with margin left auto margin right auto…
Ответитьthis is it this the good stuff i have been looking for thank you so much.
Ответитьgreat tutorial Kevin!
Ответитьthank you this helped so much
Ответитьgood
ОтветитьI went all the way back to your videos because they make me thrilled somehow by their recorders' professionalism
ОтветитьThank you so much for this. So simple yet I couldn't figure this out! It has been driving me crazy for a bit. Now to look for vertical centring
ОтветитьIt s an art you re an artist 😎🎓💝
ОтветитьClear, to the point, no beating around the bush and precise. Excellent. Thank you.
ОтветитьWould I be able to set a margin of 10px on the top and bottom but still be able to center a div? If i wrote
margin: 10px auto; would it still be centered on my page with a top and bottom margin of 10px? Thankyou for this video series. Its been very helpful on my journey learning html and css.
margin: 0 auto -- now makes SO MUCH MORE SENSE!!! Ty!
ОтветитьI really don't know how to thank you. I am watching every episode and getting new questions and problems when making my own page. AND IN ALL THAT MIRACULOUSLY YOU SOLVE EVERY PROBLEM IN THE NEXT VIDEO. Really really thank you.
ОтветитьOK, so I had a problem due to my inattention to detail. When I first tried this everything worked fine... but it somehow overrode my h1 so it was just showing up as regular text. I figured out that when I wrote my first <div class= "container"> I left off that last ">"
I just wanted to put that here in case someone else was having that same problem.
awesome!!
ОтветитьVery nice trick
ОтветитьThank You!!! :)
ОтветитьThank You!! :)
ОтветитьI spent more than a week looking at different videos and reading a couple books just to learn how to center a div and none NONE of them showed this trick. THANK YOU SO MUCH!!!
Ответитьthank you very muck
ОтветитьGreat!!!
ОтветитьThanks it's important and very useful.
Ответить