CSS Positioning Tutorial for Beginners

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024

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

  • @Violinistkinja90
    @Violinistkinja90 5 лет назад +67

    As someone with prior knowledge of positioning, I feel like this is a good video for people with (at least basic) understanding of these concepts, but not such a clear explanation for beginners.

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

      I think it's pretty good for beginners, at least better than most out there.

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

      "Beginner" doesn't mean who knows nothing and he is seeing CSS for the first time. But sure you must have the least knowledge, but talking about positioning in CSS, it is really clear!

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

      @@whynot114 That is true, however, there might be beginners who are dealing with positioning for the first time and came straight to this video. I just wouldn't want them to be discouraged, as there are indeed better explanations available on RUclips.

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

      @@Violinistkinja90 I understand 🙂

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

      @@Violinistkinja90 I'm one of those "beginners" you're talking about. I never deal with positioning before. I read a lot of articles and watched dozens of RUclips videos, but none of them makes sense enough for me, until I met this video.
      From all CSS positioning videos I've ever watched, this is the one that opened my mind. I grasped the fundamentals almost immediately .
      If you do know videos that provide better explanation, please let me know. However, I doubt I haven't watch them.

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

    Two years and three months old - and still the clearest video to explain positioning. Outstanding!

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

      Thank you so much Rick!

  • @navidmohammadzadeh2141
    @navidmohammadzadeh2141 5 лет назад +53

    I've learned four main points from this video:
    - Absolute position is when an element has a position with respect to a reference value which this also defines by the container where this element placed in.
    - Relative position is something that although the position of an element changes according to its reference, the initial placeholder of the element does not move. This leads the order of other elements does not change with respect to the initial status while in the case of absolute positioning by changing the position of an element, the order of the other elements changed.
    - The fixed position is useful when we like to have a navigation bar stick on our webpage and does move up and down with scrolling the web.
    - The last but not the least is regarding the z-index where the order of elements with respect to z-axis defines for the webpage.
    Thank you to teach me these four points.

  • @PawanKumar-tu6ti
    @PawanKumar-tu6ti 4 года назад +6

    Amazing man, even the top guys from RUclips failed to explain it better!

  • @sanderdestoop5224
    @sanderdestoop5224 3 года назад +12

    This was an amazing tutorial! I always struggled with absolute and relative positioning. This really explained it well!

  • @PaulCade
    @PaulCade 5 лет назад +18

    Just what I needed, I was struggling to understand those 3 and where they should be used.

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

      i thought i was alone this video really helped me too.

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

    thanks for this tutorial i have watch so many position css tutorials and yours is the best

  • @larissacooper3317
    @larissacooper3317 5 лет назад +4

    Thank you. This made it clearer for me with regard to your comments about he relative positioning, containing element, viewport etc.

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

    You explained it as if I am a child.... your method of teaching by actually showing pictures is very good, this is what made me understand... I saw many videos, but everyone just went through webpages, and thus I got more confused. Thank you.

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

      Glad it was helpful!

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

    How come no one else explains it like that? This channel is the best!

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

      Thanks so much for your awesome feedback Fred, this really means a lot to us!

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

    After all the time I've spent with css. Position was the one thing that always eluded me. Even after I learned flex and grid.

  • @javinpaoli
    @javinpaoli 6 лет назад +3

    Thank you so much for making this video!! I tried learning the concept off of other tutoring sites but it just didn't make sense what so ever. Watching you explain it the way that you did finally made it click in my brain. Saving this video for future reference.
    Again, thank you!

    • @academind
      @academind  6 лет назад

      Thank you very much Javin, happy to read that the video was helpful for you!

  • @tofaelahmedbhuyan6867
    @tofaelahmedbhuyan6867 5 лет назад +5

    Best explanation I have ever had. Thank you.

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

    Watched it twice and seemed a bit clearer. Ty

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

    Such am amazing tutorial. Answering the question that come to mind when you are a beginner:

  • @Traoin
    @Traoin 6 лет назад

    usualy after seeing any video if i dont understand i go to different video but after seeing this video there is no need to do that. its simple and straight to point. thank you so much:)

    • @academind
      @academind  6 лет назад

      Wow, what more can I write but thank you very very much for sharing this fantastic feedback! This honestly means a lot to me :)

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

    I am really grateful Academind, I am no longer confused! Blessings!

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

      Happy to read that Andrew, thank you!

  • @gingerplz1
    @gingerplz1 5 лет назад +19

    You are amazing! This has helped me so much.

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

    Woooooo finally..... I found a great video. You don't know how badly i was confused in all these positions. Now I get it. Thank You Very Much....💗💗💗💗💗

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

      Glad it helped, thank you Niket!

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

    the best ever video that could explain in detail the concept of position in css. Thanks a lot, please try uploading more videos like that for display and other topics as well.

  • @hfe1833
    @hfe1833 5 лет назад +10

    Clear as crystal explanation

    • @academind
      @academind  5 лет назад +1

      Thank you so much :)

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

    Thanks. I didn't understand a thing from this video.

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

    Thank you very much , the best explanation on RUclips

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

    I know this vid is a bit too old, but I want to clarify on 10:25, after you applied top: 0; to the body element, and I think in the first place that it's not gonna work even if you declared position: relative; but then, I saw the cause, you set padding: 10px on the html element and that's the white space outside the body element you saw :)

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

    Great video! This css positioning madness is why when I copy paste SO css solution it never works as I intended 😀😀😀 It’s all about the context!🙏🙏🙏🙏🙏

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

    Great tutorial my guy it was totally wicked!

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

    Best explanation I've come across about position property. Now I finally get it, thanks a lot!

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

      Simply awesome to read that Damián, thanks so much!

  • @hongfrank3398
    @hongfrank3398 5 лет назад +20

    I'm still confused.

    • @jkovert
      @jkovert 5 лет назад +3

      That means you're right on track.

    • @hongfrank3398
      @hongfrank3398 5 лет назад +3

      @@jkovert You are right. Being confused is part of the learning process. It's more of a stepping stone than a stumbling block.

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

      What part are you having trouble with? I can explain it to you in a way you'd understand. I'd know because I was in your place a couple of months ago

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

      @@nvmffs plz make a video and upload on your channel we will watch that

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

      How about know?

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

    that's great , i haven't seen any tutorial on youtube with such detailed explanation

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

      Awesome to read that Mani, thanks a lot for your fantastic feedback!

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

    Very very well explained.
    Now ,I understood all the things about the positions.
    thank you very much sir for this lecture.

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

    Your CSS explanation was great👍🏻

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

    Great video. Perfect pace and very articulate.

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

    Thank you very much for this super concise video with a crystal clear explanation. Finally, I'm able to understand CSS positioning.

  • @syednoohu8692
    @syednoohu8692 5 лет назад +16

    Absolutely Rocking!!

  • @lindaojo612
    @lindaojo612 5 лет назад +6

    Thank you, this was very helpful.

  • @Fernando-du5uj
    @Fernando-du5uj 5 лет назад

    Man, I've just started learning about HTML+CSS and that was one of my biggest doubts. And it's just the first video that I watch from you haha. Goddamit, I think I'm gonna learn alot with this channel. I'm so happy hahaha Thank you so much man. Best video I've ever seen about this subject.

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

      Thanks so much for this awesome feedback Fernando, great to have you on board of the channel! If you're looking for more resources and also some articles, you can find these on our website: academind.com/learn

  • @130869130869
    @130869130869 5 лет назад +4

    if you wanted to confuse the viewers the video is perfect !

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

      After seeing your comment, I will never take a risk

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

    position:relative;
    isn't taken out the document flow, but it can be manipulated with top, bottom, left, right

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

    thank you sir now I am clear with position

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

    One of the best guides about css positioning. Thank you!

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

      That's so great to read Christopher, thank you very much!

  • @ganeshpai202
    @ganeshpai202 6 лет назад

    Very very clear explanation and example. This should be enough to accurately get the difference.

    • @academind
      @academind  6 лет назад

      Thank you very much for your comment and your great feedback Ganesh, happy to read that the video was helpful for you!

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

    Just what I needed, thank you so much !

  • @yetanotherusername12
    @yetanotherusername12 6 лет назад +2

    I've been learning HTML and CSS for about a month now, on my own. This video has really helped clarify positioning for me in ways that other videos just glossed over with a lot of presumption. So thank you for that. But I have one concept that am unclear about and have never found an explanation.
    I am diving into the deep end with my first attempt at a website by trying to make it scale to any screen/device size.
    I hope I can clearly describe this so that maybe you can explain if "fixed" positioning is the way to go. (I'm basing my description of the layout based on a desktop computer monitor, not a smart phone or tablet.)
    I have a background image that will take the top two thirds of the screen, and it has a column of four words one atop the other (left-justified) at a very specific place on the image.
    The bottom third of the screen is split into three areas - a text area on the left, a logo in the middle, and the navigation menu on the right.
    The navigation menu, also left-justified, is exactly aligned with the column of words positioned on top of the image.
    My question is, how do I implement the ability to scale so that the column of words remains in the exact same place over the scaled image, while also having the navigation menu and the column of words remain aligned?
    Many thanks in advance for any help.

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

    It's great explanation and covering all concepts ❤️ lots of love ❤️👍

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

    Very well explained. Thanks a lot

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

    Great Explaination!! God bless you man! ❤

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

    Cheers mate. Very helpful compared to FCC shoddy and terse explanation

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

    baam ,.....this concept is so daam awesome bro .

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

    I watched this video from start to finish! Super helpful!

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

      Awesome to read that Kaleb, thanks for this wonderful feedback!

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

    Thank you for a fantastic explanation, clear and really for beginners.

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

    Excellent presentation. Thanks.

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

    Very Well-Explained My Friend

  • @istandaloneroronoazoro5188
    @istandaloneroronoazoro5188 5 лет назад +1

    Your video is AMAZING!!! Thank you! Can you also make a video where you explain ALL of CSS at this level please?

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

      Thanks so much! We actually got a full free CSS series (academind.com/learn/css/beginner-s-guide/) and a 20h+ course => www.udemy.com/css-the-complete-guide-incl-flexbox-grid-sass/?couponCode=ACAD_W

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

    really good teaching skills! very clear i understood everything

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

    Thank you for explaining the meaning of position! It helped a lot

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

    Best video I have seen so far that explains the different positions in CSS. Subscribing to your channel now!:)

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

      Thanks so much for your awesome feedback and support Darrell, happy to have you on board!

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

    Could you detail that why the header element is shrink when the display property is absolute in the header element. ? (while we inspect why it doesn't takes its own 100% of its width as a block element ?) but it clearly mentions that it is a block element in the inspect (display property). Thank you ..

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

    great video! I finally got the concept

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

    How do you define 'it gets excluded from the normal document flow' ? Community please help me understand ? I'm new to this .

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

    best tutorial about position on youtube. thank you)

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

      That's so cool to read, thanks a lot for your wonderful comment!

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

    11:30 or can we say that w/ position: absolute; on body, the positioning is in reference to the whereas w/ position: relative; on body, the positioning is in reference to ?

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

    Who is styling the element, why not just simply use the and make it less complicated. Just got more confused. Everything else is fine, just why styling htlm when you do your work in body. By structure body holds lets say all the visual content, while head holds information about page for parser, and html holds head and body. Please explain...

  • @keremonol04
    @keremonol04 5 лет назад +1

    Thanks a lot for this video! You explained awesome.

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

    Thank you. You're really good at teaching. Appreciate it.

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

      Thank you very much for this great feedback Shibunath!

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

    wow the way you teach this lesson is so nice well defining.I really looking forward for more vidoes.

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

      Thank you so much Ganguli!

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

    around 6:20 to 6:30, how is the container of the element, rather than the element?

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

    GREAT !!! Thank you so much for these awesome videos ! I'm learning so much with them !!!

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

      Thanks so much, so cool to read that :)

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

    Awesome content! I am doing Max's Angular Course. I am surprised how you two present almost equal each other. Are you brothers? Congrats.

    • @academind
      @academind  5 лет назад +1

      Thanks a lot Victor! It doesn't happen on purpose, but we know each other for a long time and work together all day, so we kind of aligned the style a bit as it seems.

  • @kaktotak547
    @kaktotak547 6 лет назад

    That was awesome .Thank you! Finally I understood how it works!

    • @academind
      @academind  6 лет назад

      So happy to read that the video was helpful for you Kakto, thanks a lot for your comment!

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

    very
    useful information very much thank u

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

    thank you!!! really great explanation

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

    What if the body is position relative, but the inside child-elements are not positioned? In that case, what is the container of the child-elements? Is it the body or the html? I read somewhere that, if the body is positioned relative, and inside of it there is a child-element with height of 100 percent, the height would be relative to the body, but if the body is not positioned relative, then the height is relative to the html. I tried it, and it didn't work. Can you comment on that?

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

    what is the use of static if it positions elements as normal? if its normal then not use static at all?

  • @edwardstoneberger606
    @edwardstoneberger606 6 лет назад

    That was a great explanation! I've been 3 days trying to place a logo over my menu bar. I think the z-index might help me overlay.

    • @academind
      @academind  6 лет назад

      Thank you very much Edward, really great to read that you like the video!

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

    6:44 Why is header positioned relative to the HTML element instead of the BODY element? Isn't the BODY element the direct container?

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

    Excellent tutorial. Thank you

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

    how do you put a big banner vertical on the Right of everything??

  • @MultiGina2005
    @MultiGina2005 5 лет назад +2

    Thanks so much man! that was really helpful!

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

    Position is old school.
    Grid is the best ✌

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

    Well that solved that forever, great explanation!

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

      Happy to read that Figgus, thank you!

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

    This video was so helpful, thank you sooo much

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

    VERY good, thanks. Subscribed.

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

      Thank you Ricardo, great to have you on board!

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

    thanks, men! its helped me a lot
    finally, I understand this topic
    liked & subscribed

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

      Thank you Vadim, great to have you on board!

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

    I wish things were explained this way, with the reasons why we do things in a certain way.

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

    Lovely video. I would suggest talking slower when comparing and contrasting position: absolute and position: relative. For a beginner it's quite hard to follow.

  • @udugmills
    @udugmills 6 лет назад

    Keep up the good work means little to you but it really helps many that you put out what you know :)

    • @academind
      @academind  6 лет назад

      Actually, it means a lot to me to read that the videos are helpful Khadar, so thank you very much for your awesome feedback! I'l try my best to keep it up :)

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

    Thank you!

  • @whitekeysandblackcoffee1381
    @whitekeysandblackcoffee1381 5 лет назад +2

    Thank you! Very helpful!

  • @skvision7510
    @skvision7510 6 лет назад

    Have just known that you have extra courses on Udemy. No matter to wait - just going to buy it

    • @academind
      @academind  6 лет назад

      That's just awesome to read, thank you for your support! In case you generally want to have an overview of all our content, our website makes finding the right topics a bit easier. No matter if you are looking for Udemy courses ( academind.com/learn/our-courses ) or our entire content ( academind.com/learn )

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

    So: why refers the "position absolute" command to the html element? can't be, because its the conatining element, because it's not. Could one say, that "position absolute" refers to the highest element in the DOM, if there is'nt any containing element given a position property? because if we appy position: absolute to the body element, the position absolute from the header element refers to body, as the containing element.

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

    Clear explanation!
    Thanks a lot.

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

      Thank YOU for your comment!

  • @illesszilagyi5336
    @illesszilagyi5336 5 лет назад +1

    great video, well explained!

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

    watching from Bangladesh

  • @md.raselkhan2426
    @md.raselkhan2426 5 лет назад +1

    THANKS A TON, brother.

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

    Thank you, that was very helpfull

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

    liked very much . awesome explanation !!!

  • @GalaxyCookies76
    @GalaxyCookies76 5 лет назад +1

    simple explanation

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

    Thank you dude ! Very good explanation

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

      Great to read that you liked the video, thank you Youssef!

  • @atmospheric_b
    @atmospheric_b 6 лет назад

    Thank you very much! Awesome tutorial

    • @academind
      @academind  6 лет назад

      It makes me very happy to read that Dimon, thank you for your comment!

  • @matuskvackaj9604
    @matuskvackaj9604 6 лет назад

    Awesome tutorial, thank you!

    • @academind
      @academind  6 лет назад

      Thank YOU for your awesome comment Matús, it's just fantastic to get such a great feedback!