Learn CSS margins in 4 minutes 📏

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ค. 2024
  • CSS margin tutorial example explained
    #CSS #margin #tutorial
    body{
    margin: 0px;
    }
    #box1{
    border: 5px solid;
    width: 250px;
    height: 250px;
    font-size: 22px;
    background: greenyellow;
    /*
    margin-top: 50px;
    margin-left: 50px;
    margin-bottom: 50px;
    margin-right: 50px;
    margin: 50px;
    */
    margin-right: auto;
    margin-left: auto;
    }
    #box2{
    border: 5px solid;
    width: 250px;
    height: 250px;
    font-size: 22px;
    background: dodgerblue;
    }
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    /* --------- style.css --------- */
    body{
    margin: 0px;
    }
    #box1{
    border: 5px solid;
    width: 250px;
    height: 250px;
    font-size: 22px;
    background: greenyellow;
    /*
    margin-top: 50px;
    margin-left: 50px;
    margin-bottom: 50px;
    margin-right: 50px;

    margin: 50px;
    */
    margin-right: auto;
    margin-left: auto;
    }
    #box2{
    border: 5px solid;
    width: 250px;
    height: 250px;
    font-size: 22px;
    background: dodgerblue;
    }

    My first website


    Lorem ipsum, dolor sit amet consectetur adipisicing elit. At alias velit, est omnis placeat ad saepe dolorum fugit mollitia deserunt delectus facere repellendus necessitatibus. Illum sapiente aliquam facilis reprehenderit soluta?
    Lorem ipsum dolor sit amet consectetur adipisicing elit. Nihil dolores pariatur officiis neque est facere explicabo in sit error maiores. Iusto velit blanditiis, illo magnam eum ipsum. Porro, modi ducimus?

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

      I'm your fellow Bro ! 💕

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

    I'm a visual learner and need to see something happen as it's being taught. This video is very helpful for me. Thank you !

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

      Me too!

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

    this what the kind of video i love to watch, as u writing the code, its being executed at once and u will see it, thanks for splitting
    ur screen and thanks for the lesson, i really appreciate

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

    THANK YOU. A LOT OF CONTENT IN 5 MINUTES. YOU'RE AWESOME!!!!!

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

    Thanks for shedding light on this. Really appreciate it.

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

    Most underrated guy ive ever seen.
    You deserve at least a milion subs..!

  • @simonroyjonesuk
    @simonroyjonesuk 10 หลายเดือนก่อน

    Another fantastic video. You are the best for a quick understanding of a topic. It's also amazing how much you learn in such a short video. Thanks very much.

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

    bro litteraly explained it so well

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

    Thanks alot! Right to the Point, simple and easily understandably visualized.

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

    Great Video! Thanks.

  • @silentEnigma0912
    @silentEnigma0912 8 หลายเดือนก่อน

    This is the only css playlist that kept me engaged the whole time🥲

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

    Explained relly well Thank You!

  • @crazyboy-cw1om
    @crazyboy-cw1om ปีที่แล้ว

    very good short explanation man.

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

    solid video bro thanks

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

    U r real Chad BROO, U actually worth MOORE subscribers!!

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

    explicated really well, thank you

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

    bro thanks for your help thus far, you have my sub 😎

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

    so much of knowledge in very short video.

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

    Amigo, eu nem falo seu idioma, mas aprendi mais com seu vídeo do que com muito material na minha língua natal!

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

    Understandble, have a good day!

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

    woow its amazing

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

    Thank you for the teacher I never met

  • @serial-killer2985
    @serial-killer2985 ปีที่แล้ว

    bro you are a live saver

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

    well explained thank you

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

    You make everything easy

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

    Thanks, Bro!

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

    Thank you very much for these videos

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

    Can you do next is padding and there uses. Keep up the good work!

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

    easily learn about margin and padding from this video.
    thanks @bro code.

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

    how do you do it to the blue box move it right a few pxs

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

    sir Good Video

  • @OuroborosAMV
    @OuroborosAMV 9 หลายเดือนก่อน

    if I want to move a picture to another section of the page I would use margin ?
    seems easy enough, I was def getting padding and margin mixed up for sure, Thanks!

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

    This video is very helpful

  • @marlinayden999
    @marlinayden999 6 หลายเดือนก่อน

    in a div with a display of flex and warping is enabled, can you prevent the double margin of two elements? in just css no js?

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

    Thank you.

  • @MrLoser-ks2xn
    @MrLoser-ks2xn ปีที่แล้ว

    Thanks!

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

    I have one question. I tried to use margin auto with an icon of fontawesome, but it didn't work until I made its container flex, so in icons margin does not the margin propertie works? Thank you

  • @Fadarabmii
    @Fadarabmii 8 หลายเดือนก่อน

    thanks man))

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

    simple and crisp

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

    helpful, thanks :)

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

    When u padding , does it affect the already written width and height?

  • @user-eh2yv8fd5o
    @user-eh2yv8fd5o ปีที่แล้ว

    醍醐灌顶,功德无量👍🏾👍🏾👍🏾

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

    THANK YOU

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

    Thank you

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

    Great

  • @chiranthurs7610
    @chiranthurs7610 7 หลายเดือนก่อน

    Thank you Sigma

  • @MuhammadAbdullah-pn2si
    @MuhammadAbdullah-pn2si 4 หลายเดือนก่อน

    Thanks

  • @nossir
    @nossir 10 หลายเดือนก่อน

    How can i understand pixels?

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

    thx a lot :)

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

    tjanks😲

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

    Thx

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

    Tnx

  • @noelbekele8193
    @noelbekele8193 9 หลายเดือนก่อน

    👍👍👍

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

    How to copy word to table

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

    Margin-right never works😢Please help

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

    600th like lez go

  • @user-nc5dz3yf3f
    @user-nc5dz3yf3f 7 หลายเดือนก่อน

    siuuuu

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

    That is hilarious thank you so much. Just one question. It seems simple but I couldn't do it. How can I put h1 and h2 and p under the same borderline and not separate. please or under the same square or rectangle or whatever it. But I want to put them under one the same roof.

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

      I think if I am understanding you correctly, you can just put all of them under 1 div element with an id attribute to add css styling.
      Example:
      Title1
      Title2
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Impedit alias sunt doloremque obcaecati dolorem molestiae corrupti recusandae et natus numquam, magni temporibus. Error corrupti quisquam cum libero excepturi, quibusdam provident!
      #box3 {
      border: 5px solid;
      width: 250px;
      height: 250px;
      font-size: 22px;
      background: rgb(0, 128, 85);
      color: aliceblue;
      }

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

    bet

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

    :((

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

    Thank you.