css position property tutorial ( fixed, absolute, relative, static )

Sdílet
Vložit
  • čas přidán 27. 08. 2024
  • CSS 'position' property explained . Learn how each fixed, absolute, relative, static value works with simple examples.
    1. Static . 0:44 . (the default position, disturbing other elements)
    2. relative . 2:00 . (remains in original position, but can be moved around without disturbing other elements)
    3. Absolute . 7:35 . (remains in original position, but by default disturbs other elements - initially only)
    4. fixed . 13:40 . (remains in original position, but by default disturbs other elements - initially only - also stays fixed on screen when scrolling up/down)
    #css #position #property
    *My Udemy Courses
    www.udemy.com/...
    www.udemy.com/...
    Follow me for technology updates
    * / techsith
    * / techsith
    * / techsith1
    * / 13677140
    * / patelhemil
    Help me translate this video.
    * www.youtube.co...
    Note: use translate.goog... to translate this video to your language. Let me know once you do that so i can give you credit. Thank you in advance.

Komentáře • 543

  • @djhonz45
    @djhonz45 Před 5 lety +6

    Codecademy, Freecodecamp, Treehouse, major respects to these guys but you have explained it much clearer than they have. You’re examples were outstanding. I finally get it!! Thank you sir!!!

  • @PcHabitat
    @PcHabitat Před 6 lety +45

    Amazing explanation...
    So its like this..
    Relative- to itself
    Absolute- to its main parent
    Fixed- to the browser

    • @PaulRamnora
      @PaulRamnora Před 5 lety +5

      Thanks very much, indeed, for that simple; but, truly GREAT summary. ;-)

  • @UmeshKumar-ox3zp
    @UmeshKumar-ox3zp Před 6 lety +14

    For longtime struggled to understand the difference of relative and absolute.. this tutorial made it clear. Thanks a lot buddy.

  • @ansinotest8644
    @ansinotest8644 Před 5 lety

    the best tutorial ive ever seen about positioning,others only speak speak speak but no example,hats off

  • @harshphoujdar1685
    @harshphoujdar1685 Před 7 lety +128

    5:29 think of this as three guys standing in a line, and they are touching each other XD

  • @Colstonewall
    @Colstonewall Před 8 lety +4

    I notice some of the comments below say "awesome tutorial", and I agree whole heartedly! You're a virtual gold mine of information, and I hope you continue making videos on a regular basis. . .Thanks again.

  • @drJcomputersdotcom
    @drJcomputersdotcom Před 6 lety +19

    INCREDIBLE ..... YOUR EXPLANATION IS SO SIMPLE BUT YET SO COMPLETE ..... YOU NEED TO TEACH THE LOUSY TEACHERS I HAVE ON HOW TO TEACH ..... LMBO 😎😉

  • @jeremiahv6498
    @jeremiahv6498 Před 8 lety

    I usually don't comment on youtube videos but, this tutorial was great.
    I like how you show everything in one screen instead of flicking back and fourth to show css results.
    took me a couple of days but i finally understand. Thanks

  • @123gregery
    @123gregery Před 5 lety +4

    I wish I had seen this video some months ago. I would have avoided so many useless readings. Thank you.

    • @Techsithtube
      @Techsithtube  Před 5 lety

      I am glad you learnt something. keep learning the fundamentals.

  • @richardsleep2045
    @richardsleep2045 Před 4 lety +1

    As others have said, this is by far the best attempt to explain this confusing stuff that I've yet seen. Thank you, very good teacher.

  • @jayantudaipurbangalore

    I seen this in 2017 before going to interview . positioning is the only question Interviewer asked me in css section and i gave these answers with same example and the interview went well . I got selected also . In my job i haven't touched css not even opened a css file my work is just did JavaScript . Today i am changing my job and going for interview came back here to recall positioning .
    Thanks sir really appreciate your time that you make tutorials

  • @MrJithoo123
    @MrJithoo123 Před 6 lety +3

    This is by far the best explanation of these position properties.

  • @climbers1376
    @climbers1376 Před 6 lety +3

    I could not understand these position attributes until I found your video. Thank you!

  • @prometheu8418
    @prometheu8418 Před 2 lety

    Finally, I've been kind of struggles understanding CSS position property. Watching this vid makes it clear. Thanks a lot!

  • @KrishnaManchikalapati
    @KrishnaManchikalapati Před 6 lety +1

    Nicely explained. Thanks.
    Few points.
    * absolute: When no top/left/right/bottom(TLRB) are mentioned, the element stays where it would stay as if it was static. But it is not entering into the flow. When the TLRB are mentioned then it is relative to it's first relative ancestor.
    * fixed: Its not relative to the root element. But its relative to the window screen size. During scroll the root element is scrolling up, but the fixed element stays there.

  • @manikantas8621
    @manikantas8621 Před 7 lety +1

    Best tutorials on JS and CSS I have ever seen so far with awesome explanation.Kudos!!!!!

  • @maragam4480
    @maragam4480 Před 8 lety +1

    I had watched several explanations without much success but I think I finally got it thanks to you man!

  • @RupjyotiNathAEC
    @RupjyotiNathAEC Před 7 lety +1

    GREAT! Cleared the entire concept of POSITION property. It just cleared all my doubts. Thanks for the video

  • @iminsane7777
    @iminsane7777 Před 7 lety +1

    Finally I understood the position property !
    Thank you so much for being so clear and to the point :)

  • @hemendrasahu7943
    @hemendrasahu7943 Před 4 lety +1

    Thanks for this tutorial explaining CSS positions: absolute, fixed and relative. Very well defined

  • @RajRoy-ok9uf
    @RajRoy-ok9uf Před 7 lety +1

    great much better than many paid tutorials

    • @Techsithtube
      @Techsithtube  Před 7 lety +1

      thanks for watching

    • @RajRoy-ok9uf
      @RajRoy-ok9uf Před 7 lety

      sir i was having problem with sending mail using php can u help

  • @salmahedward4385
    @salmahedward4385 Před 5 lety

    Already watched several videos before this one, but so far this is the best one . Thank you

  • @admirljubuncic3624
    @admirljubuncic3624 Před 5 lety

    Finally some simple and helpful explanation
    how positions behave. Thanks!

  • @jasonl3796
    @jasonl3796 Před 4 lety +1

    Very Nice, position element is hard tio understand, this is a good definition I found that might make it easier to understand:
    "What Is Absolute Positioning?
    This type of positioning allows you to place your element precisely where you want it.
    The positioning is done relative to the first relatively (or absolutely) positioned parent element. In the case when there is no positioned parent element, it will be positioned related directly to the HTML element (the page itself)."
    This helped me so much

  • @Troyster94806
    @Troyster94806 Před 5 lety +2

    Best explanations I've seen so far.

  • @sumanatprakash
    @sumanatprakash Před 3 lety +1

    Explained in a very nice and slow way.

  • @mesganahaile386
    @mesganahaile386 Před 2 lety

    Hands down the best explanation.

  • @nirmalsh1
    @nirmalsh1 Před 4 lety

    You made it so easy to understand. You are a good teacher

  • @whatsaguygottado2669
    @whatsaguygottado2669 Před 4 lety +1

    This video helped clarify the difference between status, relative, fixed and absolute - thanks. I do wish it would have shown how to make a page fit “snugly” under a menu header (for instance), so you could write one menu and have each following page section line-up beneath it (without overlap??) I guess I'll be working on that myself.... Good video though - keep-up the good work.

    • @Techsithtube
      @Techsithtube  Před 4 lety +1

      Css issues can be tough but once you solve it very much satisfying. Good Luck :)

  • @evans8245
    @evans8245 Před 6 lety

    never stop what you are doing sir! thx

  • @indiac5398
    @indiac5398 Před 6 lety

    This was a very clear and direct way to explain positioning....Thanks !!

  • @98luk45
    @98luk45 Před 7 lety

    Your explanation helped me detect a lot of issues that were in the UI in a project I'm working on. There are just so many dirty hacks (guess and check) being used just to make the elements display properly.
    Thanks man! I was getting fed up reading junk on StackOverflow being voted as best answer, that encourages filthy work-arounds; absolutely horrible for responsive app design. It's things like this that makes me want to stick to back-end.

    • @Techsithtube
      @Techsithtube  Před 7 lety +1

      I feel your pain. CSS is very annoying when it doesnt work . Use Sass if you can instead of directly modifying CSS. Good Luck!

  • @praj2711
    @praj2711 Před 6 lety

    Best and simple explanation ever

  • @dand5990
    @dand5990 Před 7 lety +3

    finally someone explained it clearly :)

  • @ikigai9616
    @ikigai9616 Před 7 lety +1

    Ah now I understand absolute vs. relative positioning. Great overview, thanks!

  • @kccraig4233
    @kccraig4233 Před 6 lety

    Finally, I understand positioning. Thank you.

    • @Techsithtube
      @Techsithtube  Před 6 lety

      :) I am gald it helped. Thanks for watching!

  • @naetharu
    @naetharu Před 6 lety +1

    Tutorial thank you very much for making it. Really helped me understand the difference between relative and absolute position looking forward to trying it all out tomorrow!

  • @DebayanSen7
    @DebayanSen7 Před 7 lety +1

    This lesson cleared my misunderstanding so much. Thank You.

  • @SabB12345
    @SabB12345 Před 4 lety

    So far the best explanation about CSS positioning. I was struggling to understand difference between relative and absolute. This video helped a lot. Thanks.

  • @nizamuddinshaikh3185
    @nizamuddinshaikh3185 Před 4 lety +1

    Tough topic explained with simple examples! Thanks for sharing.👍

    • @Techsithtube
      @Techsithtube  Před 4 lety

      Thanks Nizamuddin for a comment. Keep on learning!

  • @RogerThat902
    @RogerThat902 Před 7 lety +2

    Thank you for the video--really helped explain the difference and not make it so complicated.

  • @saidulanwar8332
    @saidulanwar8332 Před 7 lety +1

    very nicely described. It would be very helpful if you give a tutorial about z-index property of css

  • @sharonseidl4498
    @sharonseidl4498 Před 7 lety

    This was by far the BEST video tutorial on position! Thank you!

  • @ayyappach4078
    @ayyappach4078 Před 5 lety

    Really Awesome .. I have checked lots of videos to understand this concept but u have given the perfect and clear answers to this topic Thank you

  • @gulamansari9883
    @gulamansari9883 Před 5 lety +1

    After watching lots of video , finally found the best one...

  • @sumeetsood232
    @sumeetsood232 Před 5 lety

    1)When element has position absolute it moves in context to its positioned elemeent(not only relative position, as you said in video)
    2)In case of position:fixed, element moves in respect to viewport(you said, it moves with respect to body), that is why even after scrolling element is fixed.

  • @enzoborgfrantz
    @enzoborgfrantz Před 7 lety +48

    Great video, fast shipping, recommended seller A+++

  • @SK-ur3hw
    @SK-ur3hw Před 7 lety +1

    Wow! Such a simple and to the point explanation. Will be watching your other videos as well! 👍🏻

  • @yaobindong3480
    @yaobindong3480 Před 7 lety +1

    I like your examples , very clear explanation

  • @khandelwalankit22
    @khandelwalankit22 Před 7 lety

    You are so awesome. Clear and concise. Pls continue to make more video

  • @pelinkayhan
    @pelinkayhan Před 5 lety

    Yaaaaaaaassssssssss. I have been watching the tones of the video. But this one I understand perfectly. Thanks man!

    • @Techsithtube
      @Techsithtube  Před 5 lety

      I am glad you got it Pelin. Thanks for watching!

  • @ingenuity376
    @ingenuity376 Před 5 lety +1

    was struggling, but now clear! A big thanks and like the way you deliver :)

  • @geovaniraffaelli4508
    @geovaniraffaelli4508 Před 6 lety +1

    I've finally managed to understand these concepts thanks to your video. Thank you so much, I subscribed.

    • @Techsithtube
      @Techsithtube  Před 6 lety

      I am glad it helped. thanks for watching! :)

  • @LucasTalamo
    @LucasTalamo Před 6 lety

    I had some doubts about positioning and your examples helped me better understand how the code works! Thank you!!

  • @happyhuman8549
    @happyhuman8549 Před 6 lety

    Great Video.You explained this really good!Since I could not understand position properties in Css,so I came to this video.Thx!

  • @jayantudaipurbangalore

    Thanks tomorrow is my interview and i am confused with this positioning .. but now all clear :) thanks.. helpful tutorial

    • @Techsithtube
      @Techsithtube  Před 6 lety

      Good Luck with your interview. Let me know how it goes.

  • @animeboy93
    @animeboy93 Před 6 lety

    Very good. Straight forward and to the point. Good refresher for me

  • @mobilenews628
    @mobilenews628 Před 5 lety +1

    Sir You made it so easy. thank you for this wonderful video

    • @Techsithtube
      @Techsithtube  Před 5 lety

      I am glad that you learnt Ziaul. thanks for watching!

  • @PaulRamnora
    @PaulRamnora Před 5 lety

    Excellent! ;-) I found that when I merely just sat idly by, and, 'watched' the video...the concepts just seemed to pass over my head...I sort of understood/and, yet, another part of me, didn't quite get it...?!
    However, once I had made up my mind to stop being so incredibly 'lazy'; and, just get up...move over to the desktop computer; and, there do the exercises 'hands on'...well, my understanding became so much deeper.
    So, when he said adding inside of the CSS sheet the rule: 'position:relative;' onto any element...allows you to move around that element using: 'top/bottom/left/right'. I actually went and experimented by carefully applying each of these methods, one at a time: 'top:10px;'/'bottom:10px';/'right:10px'/'left:10px'
    ...I also noted that...
    when you move an element's 'top' position the element actually moves 'downwards'
    when you move an elements 'bottom' position the element actually moves 'upwards'
    ...similarly...
    when you move an elements 'left' position the element actually moves 'rightwards'
    when you move an elements 'right' position the element actually moves 'leftwards'
    I also, understood exactly what he meant by, the elements 'point of origin': 0,0; stayed exactly the same/while all positioning was being done relative to that particular point.
    Using this much slower 'step by step' investigative method...as opposed to very 'quickly' watching/and, re-watching the video all in one go; and, by practising positioning elements/then, re-positioning elements myself...I understood exactly what he had meant in lot more 'concrete' manner...also, in a way that tends to 'stick' inside of one's mind; as opposed to these ideas going in/then, immediately, going back out, again!
    Right now, I'm only merely half-way through the video...; anyway, I decided to upload all that I've gone and learned so far into my GitHub online a/c.
    Source code can be seen here...
    github.com/pramnora/css/blob/master/css-positioning-01.html
    Application web page can be seen here...
    peaceful-wing-65e1cd.netlify.com/css-positioning-01.html

  • @kannansnair7353
    @kannansnair7353 Před 4 lety

    Really helped in understanding the concept compared to other videos I referred.

  • @climbers1376
    @climbers1376 Před 6 lety

    The order is
    1. Static . 0:44 . (the default position, disturbing other elements)
    2. relative . 2:00 . (remains in original position, but can be moved around without disturbing other elements)
    3. Absolute . 7:35 . (remains in original position, but by default disturbs other elements - initially only)
    4. fixed . 13:40 . (remains in original position, but by default disturbs other elements - initially only - also stays fixed on screen when scrolling up/down)

  • @mohamedhamza2801
    @mohamedhamza2801 Před 4 lety

    you make position property easy, thank you very much

  • @amarpreetkpuri
    @amarpreetkpuri Před 7 lety +1

    great!! i never understand this positions.. but after watching your video i totally understand..thankyou so much !!!

  • @vladimirdomin5877
    @vladimirdomin5877 Před 7 lety +1

    Cool, Thank you. I have better understanding of absolute position now. Example helped a lot. Would be great to have more examples to see it.

  • @lavanyak3305
    @lavanyak3305 Před 5 lety

    Clearly understood the concept,thank you Guruji..

  • @mcse2010ajm62
    @mcse2010ajm62 Před 8 lety

    great video on the position property.I am a newbie and this really does help. Thank you.

  • @johnpzaccari
    @johnpzaccari Před 7 lety +1

    thank you for the examples! really helped me understand the concept

  • @escapiststupor
    @escapiststupor Před 7 lety +1

    simply the best tutorial out there!

  • @josephhuff1878
    @josephhuff1878 Před 8 lety +18

    So if a elements position is absolute,,,it will float on top of everything and have a position relevant to the top left corner of its parent (IF its parent is relative)..and if its parent isnt relative,,it moves in relevance to the BODY's top left corner?

    • @Techsithtube
      @Techsithtube  Před 8 lety +7

      yes .

    • @abidzaid3260
      @abidzaid3260 Před 7 lety +4

      It is relative to the parent if the parent is not static.
      "Absolute: The element is positioned relative to its first positioned (not static) ancestor element"

    • @zodaapolo
      @zodaapolo Před 6 lety +4

      From source: For an absolutely positioned element, where the left, top, etc. are calculated from depends upon the position property of the parent and grandparents of the element in question. If the parent of the element is a positioned element (meaning its position is set to anything except position:static), then an absolutely positioned child is positioned relative to that parents rectangle (or grandparent, or great-grandparent, etc). But if none of the parents are positioned elements, the child is positioned relative to the bounds of the document.

  • @paulhourican8747
    @paulhourican8747 Před 4 lety +1

    Great explanation, thank you

  • @akumino1
    @akumino1 Před 5 lety +1

    Really good explanation ...

  • @benmac6862
    @benmac6862 Před 6 lety

    Clear and simple tutorial, thanks

  • @droper3225
    @droper3225 Před 6 lety +1

    Great job on this video. I learned a lot.

  • @huhTyree
    @huhTyree Před 4 lety +1

    Really good video extremely happy I clicked on it

  • @sirnatanielson
    @sirnatanielson Před 7 lety

    Very helpful. Have a much better grasp on it now. Will probably watch again to solidify it, but it's a great start. Thanks!

  • @laxmithrylokya1674
    @laxmithrylokya1674 Před 2 lety

    Extraordinary explanation

  • @SubhashKumar-do6ld
    @SubhashKumar-do6ld Před 5 lety +1

    your tutorials are superb :)

  • @shanepemmelaar7519
    @shanepemmelaar7519 Před 7 lety +1

    Really nice video. Very clear explanation and very detailed.

  • @nicoletang1834
    @nicoletang1834 Před 6 lety

    Thank you! Now I'm much clear about css position!

  • @igorpavlenko411
    @igorpavlenko411 Před 6 lety +1

    Great video, really good explanation !!

  • @scottkeita
    @scottkeita Před 7 lety +9

    awesome tutorial i get it now bring more css tutorials

    • @Techsithtube
      @Techsithtube  Před 7 lety +1

      Let me know if you want a tutorial on specific topic. thanks for watching

  • @moises-cp
    @moises-cp Před 6 lety +2

    Thank you for explaining this. It was very helpful!

  • @raptorcharlie115
    @raptorcharlie115 Před 4 lety +1

    Great explanation. Thanks a lot. :)

  • @keystroke99
    @keystroke99 Před 7 lety +1

    thanks for such a clear cut explanation :) liked it bro

  • @gabrielpereiramendes3463

    Good lesson! Thanks from Brazil!

  • @stevewhite2
    @stevewhite2 Před 7 lety

    A good clear explanation

  • @bobbyrutts
    @bobbyrutts Před 7 lety +8

    Just found you today.. this is the best explanation of "position" I've found.. "Position" and I don't get along.

  • @mdsayedahammed2367
    @mdsayedahammed2367 Před 6 lety +1

    Wow !! Amazing What an explanation is !!!

  • @yoerivanwassenhove673
    @yoerivanwassenhove673 Před 6 lety +3

    Quality content. Good job.

  • @nedimkufi
    @nedimkufi Před 3 lety +1

    Great lesson. Thank you

  • @SurajPatil93
    @SurajPatil93 Před 5 lety +1

    This is a very handy video for quick interview preparation. But I noticed that it is missing info about position sticky. It would be great if you could add this to your video. Thanks.

    • @Techsithtube
      @Techsithtube  Před 5 lety

      Unfortunately once video is added you can't edit it. I will make another video for that

  • @bluntly3963
    @bluntly3963 Před 7 lety

    Great explanation!! I clearly understood the difference between position: fixed, absolute, relative.Thanks.

  • @caleba.robinson8451
    @caleba.robinson8451 Před 6 lety +1

    Really useful tutorial! Would recommend watching it on 1.5x speed though

  • @al-ekramelaheehridoy7297
    @al-ekramelaheehridoy7297 Před 8 lety +3

    Your way of teaching is the best...

  • @srishapattabiraman8418

    Very clear explanation

  • @aarthysekar7814
    @aarthysekar7814 Před 7 lety +1

    Its great! Worth watching

  • @chrismann3933
    @chrismann3933 Před 6 lety

    At 5:34 I had to hold in my laughter in a silent library. I know, I'm immature. But thanks for this video. I'm in the midst if a prep course for a coding bootcamp and have fallen behind because I've focused all of my time and energy into fully comprehending this very subject. I sincerely believe I will have it down by 2021.

    • @Techsithtube
      @Techsithtube  Před 6 lety

      I realized what I have done after reading some of the comments like yours. :) I hope it provided some entertainment.

  • @seetheworldsecond
    @seetheworldsecond Před 7 lety +1

    Great video! Thank you so much! Made learning how to use different positions with CSS easy!

  • @rajuu_ra
    @rajuu_ra Před 7 lety +1

    very usefull tip Bro,Thank u

  • @VicZ582
    @VicZ582 Před 3 lety

    Very clear, thank you @Techsith