CSS Positioning Tutorial for Beginners

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 339

  • @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!

  • @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 UA-cam.

    • @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 UA-cam 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.

  • @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 UA-cam failed to explain it better!

  • @sanderdestoop5224
    @sanderdestoop5224 4 роки тому +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 4 роки тому +1

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

  • @lightning4201
    @lightning4201 4 роки тому

    Watched it twice and seemed a bit clearer. Ty

  • @briant9966
    @briant9966 3 роки тому +1

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

  • @sanskar_choudhary
    @sanskar_choudhary 3 роки тому

    Your CSS explanation was great👍🏻

  • @andrewwachira1
    @andrewwachira1 5 років тому

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

    • @academind
      @academind  5 років тому

      Happy to read that Andrew, thank you!

  • @centori2011
    @centori2011 6 років тому

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

    • @academind
      @academind  6 років тому

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

  • @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.

  • @dimplechhapolia1247
    @dimplechhapolia1247 4 роки тому

    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.

  • @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.

  • @gingerplz1
    @gingerplz1 5 років тому +19

    You are amazing! This has helped me so much.

  • @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 :)

  • @tofaelahmedbhuyan6867
    @tofaelahmedbhuyan6867 5 років тому +5

    Best explanation I have ever had. Thank you.

  • @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!

  • @solahope6474
    @solahope6474 2 роки тому

    Thank you very much , the best explanation on UA-cam

  • @accelerator5524
    @accelerator5524 3 роки тому

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

  • @hfe1833
    @hfe1833 6 років тому +10

    Clear as crystal explanation

    • @academind
      @academind  6 років тому +1

      Thank you so much :)

  • @VTEXVSI
    @VTEXVSI 4 роки тому +2

    Great video. Perfect pace and very articulate.

  • @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!

  • @atulkkale
    @atulkkale 4 роки тому +1

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

  • @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.

  • @sherozehaidervlogs3283
    @sherozehaidervlogs3283 4 роки тому

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

  • @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.

  • @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!

  • @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!

  • @felicitakowalska2317
    @felicitakowalska2317 Рік тому

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

  • @loggingman72
    @loggingman72 4 роки тому +1

    Just what I needed, thank you so much !

  • @syednoohu8692
    @syednoohu8692 5 років тому +16

    Absolutely Rocking!!

  • @maxxinmaze4501
    @maxxinmaze4501 4 роки тому +1

    Great Explaination!! God bless you man! ❤

  • @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!

  • @zeroskill990
    @zeroskill990 5 років тому

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

  • @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!

  • @darrellharris5098
    @darrellharris5098 5 років тому

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

    • @academind
      @academind  5 років тому

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

  • @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!

  • @apilacharya4093
    @apilacharya4093 4 роки тому

    Very Well-Explained My Friend

  • @lindaojo612
    @lindaojo612 5 років тому +6

    Thank you, this was very helpful.

  • @iancarr3923
    @iancarr3923 4 роки тому

    Excellent presentation. Thanks.

  • @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?

  • @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 ?

  • @dishantkumawat7508
    @dishantkumawat7508 4 роки тому +1

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

  • @Fernando-du5uj
    @Fernando-du5uj 6 років тому

    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  6 років тому

      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

  • @subashbose3808
    @subashbose3808 3 роки тому

    thank you sir now I am clear with position

  • @bastawa
    @bastawa 5 років тому +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!🙏🙏🙏🙏🙏

  • @ram3832
    @ram3832 4 роки тому

    great video! I finally got the concept

  • @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.

  • @firdausizaharagandes5449
    @firdausizaharagandes5449 3 роки тому

    thank you!!! really great explanation

  • @alexgames176
    @alexgames176 5 років тому +1

    really good teaching skills! very clear i understood everything

  • @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!

  • @mothmurdock
    @mothmurdock 5 років тому +1

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

  • @praveenvatambeti591
    @praveenvatambeti591 5 років тому

    Excellent tutorial. Thank you

  • @harshvaghanii
    @harshvaghanii 5 років тому

    Wow well explained brother

  • @Courserasrikanthdrk
    @Courserasrikanthdrk 4 роки тому

    very
    useful information very much thank u

  • @obscurecult
    @obscurecult 4 роки тому

    VERY good, thanks. Subscribed.

    • @academind
      @academind  4 роки тому

      Thank you Ricardo, great to have you on board!

  • @fk3239
    @fk3239 5 років тому

    Well that solved that forever, great explanation!

    • @academind
      @academind  5 років тому

      Happy to read that Figgus, thank you!

  • @hugochavez6170
    @hugochavez6170 5 років тому

    Very good explanation. Thank you!

    • @academind
      @academind  5 років тому

      Great to read that Hugo, thank you for your comment!

  • @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!

  • @WarLordCol
    @WarLordCol 5 років тому

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

    • @academind
      @academind  5 років тому

      Thank you Vadim, great to have you on board!

  • @eaglechildkeys
    @eaglechildkeys 5 років тому

    Thank you very much! very helpful!

    • @academind
      @academind  5 років тому

      That's awesome to read, thank you Chris!

  • @davepile367
    @davepile367 5 років тому

    awesome! very clear explanation

  • @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 :)

  • @katherinefox7818
    @katherinefox7818 4 роки тому

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

  • @pawanrk4818
    @pawanrk4818 5 років тому +1

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

  • @gomad5842
    @gomad5842 5 років тому

    Clear explanation!
    Thanks a lot.

    • @academind
      @academind  5 років тому

      Thank YOU for your comment!

  • @shibunathshanker244
    @shibunathshanker244 6 років тому

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

    • @academind
      @academind  6 років тому

      Thank you very much for this great feedback Shibunath!

  • @mehra.akshit
    @mehra.akshit 7 років тому +15

    Hi Manuel, I am confused when you say the container element of 'header' is 'html,' but it should be 'body,' I guess.

    • @academind
      @academind  7 років тому +20

      Hi Akshit, do you refer to what I'm saying at 6:30? There, we use position: absolute for our 'header', which turns our 'html' element into the containing element for 'header' from a positioning perspective (that's the default behaviour of position: absolute). As soon as we add a position property to 'body', this becomes the containing element of the 'header'.

    • @mehra.akshit
      @mehra.akshit 7 років тому +20

      Academind Ahh, I got it. If there's no position property defined in any up level element of an element that has position defined, 'html' will be the containing element. But if any of the up level elements (the nearest one) have position property defined, that particular element will act as the container. Watching the video again made more sense now. Thank you very much for these videos, and also for responding. It would be very nice if we can have a CSS grid tutorial in future.

    • @mohamedjolti572
      @mohamedjolti572 5 років тому

      this is a free course in udemy fro javascript and php and ajax:
      www.udemy.com/make-a-translation-website-javascriptajaxphp-mysql/?couponCode=GOOGELETRANSLATE_89

  • @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 4 роки тому +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 4 роки тому

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

    • @farhanaditya2647
      @farhanaditya2647 3 роки тому

      How about know?

  • @yousseftijdit
    @yousseftijdit 5 років тому

    Thank you dude ! Very good explanation

    • @academind
      @academind  5 років тому

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

  • @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

  • @illesszilagyi5336
    @illesszilagyi5336 5 років тому +1

    great video, well explained!

  • @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 :)

  • @maulahaz
    @maulahaz 5 років тому

    meaningfull to learn from this tut video..thanks.

    • @academind
      @academind  5 років тому

      Happy to read that, thanks a lot!

  • @idettem8881
    @idettem8881 4 роки тому

    This video was so helpful, thank you sooo much

  • @alext8593
    @alext8593 4 роки тому

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

  • @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

  • @keremonol04
    @keremonol04 5 років тому +1

    Thanks a lot for this video! You explained awesome.

  • @furiouzzzz
    @furiouzzzz 5 років тому

    very clear explanation

  • @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 ..

  • @dhairyalakhera893
    @dhairyalakhera893 4 роки тому

    Good explanation

  • @himanshusoni6096
    @himanshusoni6096 4 роки тому

    Thanks a lot man. Helped a lot! Cheers.

  • @MultiGina2005
    @MultiGina2005 5 років тому +2

    Thanks so much man! that was really helpful!

  • @BSHProductionProgramming
    @BSHProductionProgramming 5 років тому +1

    Which ide does he use?

    • @academind
      @academind  5 років тому

      I use Visual Studio Code.

  • @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!

  • @aliulanowar7802
    @aliulanowar7802 5 років тому

    You are really genius , sir.💕❤💕

    • @academind
      @academind  5 років тому

      This means so much to me Aliul, thanks a million :)

  • @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!

  • @loki_glorious_purpose
    @loki_glorious_purpose 4 роки тому

    Amazing. It helped me a lot❤️

  • @trungtrinh8513
    @trungtrinh8513 5 років тому

    Really understandable !! Thanks a lot

  • @whitekeysandblackcoffee1381
    @whitekeysandblackcoffee1381 5 років тому +2

    Thank you! Very helpful!

  • @dilshodrizayev
    @dilshodrizayev 5 років тому

    liked very much . awesome explanation !!!

  • @sir_duckington1245
    @sir_duckington1245 4 роки тому

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

  • @mladenkaorlic
    @mladenkaorlic 2 роки тому

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

  • @ashiinsane90
    @ashiinsane90 5 років тому

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

  • @peteryu4353
    @peteryu4353 6 років тому

    Hi, is there a way I can add an image in a div that has 6px 0px padding and make the image overlay on the row? So far I am only seeing the image contained inside of div and only seeing partial image. Thanks!

  • @hippiejosh63
    @hippiejosh63 7 років тому +1

    Useful, thanks again guys!

    • @academind
      @academind  7 років тому

      Thank YOU for your amazing support Josh!

  • @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!

  • @erick_la
    @erick_la 4 роки тому

    Thank you
    Very helpful

  • @hamedf7953
    @hamedf7953 5 років тому

    thanks man ,it was a complete tutorial❤

    • @academind
      @academind  5 років тому

      Awesome to read that Hamed, thank you!