Flexbox or grid - How to decide?

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

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

  • @ELEV808
    @ELEV808 2 ปีที่แล้ว +674

    If we want a FLEXIBLE layout (the layout adapts to fit the content), we use flex.
    If we want a more fixed layout (the content adapts to fit the layout), we use grid.

    • @kevinwg02
      @kevinwg02 ปีที่แล้ว +14

      and if we don't know which one it will be ? ^^ do both ^^ ?

    • @arshadsiddiqui9071
      @arshadsiddiqui9071 ปีที่แล้ว +40

      If I can picture the grid I use grid. If I can't I just use flex cuz it's easier.

    • @revi925
      @revi925 ปีที่แล้ว +4

      But isnt grid also flexible if you use minmax?

    • @lucidattf
      @lucidattf ปีที่แล้ว +11

      @@revi925 that's more for adapting a fixed grid to any screen size than having it be flexible to any content, though sometimes it works for either

    • @GooseGumlizzard
      @GooseGumlizzard ปีที่แล้ว +23

      nah fam absolute positioning for everything masterrace

  • @jackfrosch
    @jackfrosch ปีที่แล้ว +213

    As a mostly backend developer, every time I have to use CSS, it feels like I'm starting over. Your videos are my go-to resource to refresh and add to my CSS understanding.

    • @KevinPowell
      @KevinPowell  ปีที่แล้ว +10

      Thanks so much!

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

      As an inspiring backend developer, please can you refer me on the material that will guide me becoming a backend?

    • @27sosite73
      @27sosite73 ปีที่แล้ว +2

      @@userhenrolwest
      Hey!
      the inspiring backend developer hasn't replied yet. Are you still waiting or have you started working on something, Henrol West?
      if you are curious, how I know you're from India? Typically, only people from India ask questions in that manner.

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

      @@27sosite73 I'm still waiting.

    • @AthelstanEngland
      @AthelstanEngland 5 หลายเดือนก่อน

      Feel your pain. For me it feels like the Frameworks or styles or technologies change every time I look away.

  • @milos018
    @milos018 2 ปีที่แล้ว +124

    This is probably the best summary of Flex vs Grid, the pros and cons and how they can work together. Great job!

  • @vibonacci
    @vibonacci 2 ปีที่แล้ว +188

    My rule: if I can't achieve it easily with flex, I'll pivot to grid. Flex is the go-to choice. But I have to admit that I have less experience with grid than with flex, so that definitely plays a role in the decision. And simply by the amount of choices you have, you can conclude that grid is quite a bit more complex.

    • @HarshRajAlwaysfree
      @HarshRajAlwaysfree 2 ปีที่แล้ว +23

      same, i had tried grid once
      it was so traumatic, I never did it again

    • @sourandbitter3062
      @sourandbitter3062 2 ปีที่แล้ว +15

      grid-template-areas gives great results. Grid really isn’t too bad.

    • @turolretar
      @turolretar 2 ปีที่แล้ว +5

      grid is actually op

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

      @@HarshRajAlwaysfree 😁😂

    • @WyzrdCat
      @WyzrdCat ปีที่แล้ว +8

      Grid feels like JS not CSS. It's poorly implemented and doesn't belong in the language, but no going back now. Basically grid was their prototype at trying to get away from floats, then with flex they actually did it right.

  • @perkin524
    @perkin524 2 ปีที่แล้ว +84

    You have made quite a few videos recently on flexbox and grid but I find the repetition enormously helpful. The basic principles are getting hammered in and I find I can now use them much more confidently. Keep on going and thank you!

  • @jacobphillips9235
    @jacobphillips9235 7 วันที่ผ่านมา

    Thank you so much! The live demonstration of the differences between them is awesome!

  • @marcelijankowski9593
    @marcelijankowski9593 2 ปีที่แล้ว +168

    I tend to use grid for overall layout of the web page or for larger components.
    While Flexbox often helps me with Individual components, basically I use it on the smaller scale.

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

      yes

    • @ahndeux
      @ahndeux 2 ปีที่แล้ว +4

      I do the same, except grid for the overall page design and if there is one grid where there is a complex layout (ie: a main page), I would use flexbox... NOT! I use a sub-grid instead. Flexbox is strictly for when I don't care about position exactly. I spent way too much time on flexbox to find out it still doesn't do what I want as the screen size changes.

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

      exactly.

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

      I do exactly the same thing.

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

      This is the old adage, but it isn't how you should look at Grid in my opinion. I use Grid within button elements and all sorts of tiny things.

  • @VV-wl8gb
    @VV-wl8gb 2 ปีที่แล้ว +37

    Amazing demonstration! Kevin is the undisputed MVP!
    These clicked for me:
    - in flexbox each row/column is independent of the others
    - use flexbox when intrinsic sizes are important or useful
    - use grid when you need a rigid structure (e.g. some card archive, say a blog, shop or events)

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

    the way you explain things is great man. as a person who gets distracted by the simpliest things, i can watch your videos without losing my focus for hours. much appreciated.

  • @reflectionethio9662
    @reflectionethio9662 2 ปีที่แล้ว +10

    I am using grid for the outer structure and flex for positioning items in certain layout inside the container. It holiday today in Ethiopia and am still viewing this tutorial because its kev . Thank you

  • @Detonat0r
    @Detonat0r 2 ปีที่แล้ว +366

    I prefer to use grid for the whole page layout, while flex for smaller scale things as you showed in the last example.

    • @mightycatniss
      @mightycatniss 2 ปีที่แล้ว +29

      This is the way

    • @Waruto
      @Waruto 2 ปีที่แล้ว +12

      This is the way

    • @drwho9319
      @drwho9319 2 ปีที่แล้ว +7

      Like a bantha. I have spoken

    • @BboyHotshot
      @BboyHotshot 2 ปีที่แล้ว +5

      Same. This is the way.

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

      Thank god, i am not alone😄

  • @codexaeterna
    @codexaeterna 2 ปีที่แล้ว +19

    You did a way better explanation of flex vs. grid than my college professors. CSS is so awesome, I enjoy working with it more than any other languages, probably because of my artistic background.

  • @lamthaotran19
    @lamthaotran19 2 ปีที่แล้ว +6

    I'm binge-watching your videos to teach myself CSS during my 30-min breaks at work. Thanks a ton.

  • @unblemished_
    @unblemished_ 2 ปีที่แล้ว +4

    You sir, are a real hero. Making these kind of videos for totally free is an honorable work!

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

    Always wondered why Flex was considered 1D when we could lay it out in a 2D matrix like manner. Your video has clarified and cleared my doubts. Thank you.

  • @theyreMineralsMarie
    @theyreMineralsMarie 2 ปีที่แล้ว +31

    Grid template areas are a lifesaver when scaffolding apps in a team environment. It's easy to teach other developers and makes it easy to maintain the layout as you add features.

  • @GildwareTechnologies
    @GildwareTechnologies ปีที่แล้ว +7

    Flexbox and Grid are two powerful layout systems in CSS, each with its own strengths and use cases. Let's compare them to understand when to use Flexbox and when to use Grid:
    Flexbox:
    One-dimensional Layout: Flexbox is designed for one-dimensional layouts, either in rows or columns. It excels at distributing items along a single axis, making it ideal for creating flexible and responsive layouts.
    Content Ordering: Flexbox allows you to easily change the order of flex items without modifying the HTML structure, which is useful for responsive designs or reordering elements in different screen sizes.
    Alignment and Justification: Flexbox provides precise control over alignment and justification of flex items along the main axis and cross axis.
    Complexity: It is relatively easy to understand and implement, making it a good choice for simpler layouts.
    Grid:
    Two-dimensional Layout: Grid is designed for two-dimensional layouts, allowing you to create complex grid-based structures with rows and columns.
    Grid Items Control: It provides fine-grained control over the placement and sizing of grid items. You can define explicit sizes for rows and columns and position items anywhere on the grid.
    Responsive Layouts: Grid excels at creating responsive layouts where elements reflow based on available space, providing a powerful solution for complex responsive designs.
    Alignment and Spacing: Grid offers powerful alignment and spacing capabilities along both axes.
    Complexity: Grid may have a steeper learning curve compared to Flexbox, especially for complex layouts.
    When to Use Flexbox:
    For one-dimensional layouts, such as navigation menus, card layouts, or vertically stacked elements.
    When you need to distribute items along a single axis with flexible sizing.
    For aligning or justifying items within their container.
    When to Use Grid:
    For two-dimensional layouts, like complex grids, magazine-style layouts, or multi-column forms.
    When you need precise control over the placement and sizing of items in both rows and columns.
    For creating responsive layouts with automatic reflow and resizing.
    In many cases, Flexbox and Grid can be used together to create more sophisticated and responsive layouts. It is common to use Flexbox inside Grid cells to further control the alignment and ordering of elements within the grid.
    In summary, use Flexbox for simpler one-dimensional layouts and flexible content distribution, while Grid is best suited for more complex two-dimensional layouts and fine control over grid items. Understanding both Flexbox and Grid will give you the tools to create versatile and responsive web designs efficiently.

  • @Emily-yb3pd
    @Emily-yb3pd 2 ปีที่แล้ว +7

    I always used to read about 'learn flex there, learn flex here' when I was learning css and I thought that grid was some outdated feature but it's not. It's good to know, amazing content

  • @Luke-A
    @Luke-A 2 หลายเดือนก่อน

    Thank you for your help, recently started with HTML and CSS and was stuck for about 2 weeks just trying to get a side panel to be 100% height and was having problems with one page it was full height another it was half height. Changed to using grid instead of flex, and it worked straight away.

  • @ShariLynnSmith
    @ShariLynnSmith 2 ปีที่แล้ว +5

    Kevin, thank you for showing each of these as you did. I believe I now have a much better understanding of what each is good for in a way I never have & I've tried. Thank you!

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

    Danke!

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

    Thanks man. I've been a webdev ~15 years ago, when we got to fight with IE6, and recently gettign back into it. Your content is super helpful to get back up to speed.

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

      And nowadays we fight with IE11. How the world has changed.

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

      @@jtinz74 It's nowhere near as bad as it used to be.

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

    This video came to me exactly while i was struggling to learn the differences between flexbox and grid, and explained that everything so clearly. Thank you for this amazing content.

  • @HarishChouhan
    @HarishChouhan 2 ปีที่แล้ว +3

    I recently got back into this as I was working with a WordPress theme and now realize how in some cases flex is easy to use. One area would be a website header with the logo, menu and maybe social icons all aligned in a neat with with just few lines of code.

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

    Really great content! Coming from software then backend, all too often i have felt like CSS is a nightmare. In only 20min you just gave me the explanations i needed to fix my layout (i switched from grid to flex) and now it looks great and it is responsive. Keep doing what you do. Big thanksss!

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

    I’m so glad I watched this. I’ve been trying to figure out a problem on a site where a list of logos wasn’t working as I expected. Finally got it to work thanks to the mention of grid children and a flex/grid combo.

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

    This is the most useful video about CSS I've ever watched! Thank you so much, Kevin :D

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

    I've watched quite a few videos on flex grid trying to understand were and how to use them. i can truthfully say with out any doubt that this was by far the easiest and best video of the topic for many reasons.
    I could have also gone to a bootcamp and payed a few $$$$ for this same information. But i highly doubt that it would have been as effective to get to explain the topic as well as this video.

  • @zachjensz
    @zachjensz 2 ปีที่แล้ว +837

    Obviously floats are the best layout tool

    • @c__beck
      @c__beck 2 ปีที่แล้ว +43

      Dem be fightin' wordz!

    • @marcelijankowski9593
      @marcelijankowski9593 2 ปีที่แล้ว +125

      floats?
      Bro they aint supported in IE, better stick with inline and blocks

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

      ​@@marcelijankowski9593 🤣🤣🤣🤣🤣🤣

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

      Obviously you are from the future. How did you leave a comment the day before the video came out?

    • @b1mind
      @b1mind 2 ปีที่แล้ว +4

      @@jscode6330 patron, but he is from the future

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

    It's crazy how it's highly unlikely that I would have known any of this if I hadn't found this video. Thanks, Kevin.

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

    Thanks for the comparison of both. This will help me in future! I tend to forget how / which layout I should use due to not regulary using it.
    What me personally drives me crazy is the flex-direction. There I always think the opposite.

  • @David-te6tw
    @David-te6tw 2 ปีที่แล้ว

    Thanks!

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

      Thank you so much (and sorry for missing this until now!)

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

    It's not very often I find one simple, concise video that answers the exact questions I have. Thank you!

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

    Flexbox with flex-wrap: wrap and justify-content: center for laying out a collection of items where you don't know how many there are and don't want one or two at the start or end of the last row

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

    Great video, Kevin. I like the benchmark of asking what determines the column widths: items or parent. That's a helpful way to conceptualize when to choose either. Bravo 👏

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

    Thank you very much Kevin, you made me to fall in love with CSS, by simplifying some concept which are hard to understand

    • @lukas.webdev
      @lukas.webdev ปีที่แล้ว

      If you also want to fall in love with the CSS Framework "Tailwind CSS": I will post a video about it next week on my channel ... 😉

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

    Can't thank you enough for this. It's one of the best explanations who's struggling to understand that.

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

    Use grid if you want the parent to specify the columns and rows and use flex if you want the chrildren to do it.
    I find grid a lot easier to work with and it's a real godsend that saved a lot of time for me. Flex and flex-wrap however are still really nice if you want floating behavior with added features like justify: center, and without all the clearfix hassle.

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

    clarified quite a lot for me, thanks my men, definitely will subscribe

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

    I have learned a lot you. My deeper understanding of css is due to you.
    I am comfortable using vanilla css than any css framework.
    Grateful to you.

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

    This is a great summery of flex and grid. I used alredy Booth. But never felt comfortable with it. this video is realy helpful to understand this two systems

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

    Thank you so much. Your videos have been a blessing to helping me start off and helping my fathers business grow.

  • @enzocecillon1452
    @enzocecillon1452 2 ปีที่แล้ว +21

    I started with flex as a beginner (I’m still) and tried to learn grid. I find it way more intuitive and easier to use overall. Just my newbie opinion 🤷‍♂️.

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

      Exactly grid is just simpler to pick up and starting building with.

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

      I totally agree

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

    Woow really thank you for explaining everything. I struggle with layout and I started to learn the basics and this really helped me to understand it much more!

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

    I've been using flex for years and love it, but I recently needed a way to layer a container above another container without using z-index and position properties, grid worked phenomenally with being able to tell 2 containers to be on the same row and column.
    I will admit that it's a bit more complex than flex, but I'm slowly comprehending it the more I use it, as with anything in life.

  • @cipherxen2
    @cipherxen2 2 ปีที่แล้ว +12

    Flex : asks children their size, tells their location
    Grid : tells children their size and location both
    Flex for lists
    Grid for tables

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

    kevin's videos quality out league every other content creator. He explains every detail of the subject so smooth and clear.

  • @davidkonevky7372
    @davidkonevky7372 ปีที่แล้ว +5

    Flexbox is better for objects with irregular sizes that need to be accomodated by building the layout around them. While grid on it's default works at it's best when the objects are similar to each other, making them easily fit in the simple layout instead of the opposite. Ofc both of these can be changed with properties but on their most primitive state they tend to work like this.

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

    the best material about Grid and Flexbox I have evere found. Thanks!

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

    Thank you so much for these videos. This is the first time I've explored using flex for something, so this is invaluable.

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

    Thanks for this, you convinced me to start using more grid display instead of going for flexbox as my default option!

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

    Thanks for this, it's just what the doctor ordered! I'm holding a web developer position now for a Financial Technology company and doing a lot of research and practice with CSS and JavaScript. I was looking to spice up my skills on Flex and Grid, I will be watching your other videos on them too!

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

    Need to keep in mind that grid is new.
    I made one report table like page, but then realized that one function is supported only in Firefox, and then i had to rewrite it to support chrome too.
    However, grid is fantastic feature, it adds insane adaptivity to webpages. flex is good for 1D, grid is for 2D lol. grid is more pleasant for 2D lol

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

    Kevin, really thank you, you are such a magnificent teacher! All the best!

  • @René-e2f
    @René-e2f ปีที่แล้ว

    First of all : you really remind me of Ted Mosby from How i met your mother :D Your tutorials are really helpful so far for me! Im a backend developer and trying to get more into frontend and it can be really frustrating with css. But like everything in programming it takes time, the only thing i can tell anyone who is starting with programming practice is the key of everything :)

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

    It's interesting you say that grid is easier to learn than flexbox. I found the opposite was true. This was a great breakdown.

  • @MO-dg4wr
    @MO-dg4wr ปีที่แล้ว

    Thanks, simplified illustration, yet thoroughly grasped the concept better now...

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

    your videos are so smooth and chill

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

    You explain so well man, this is great!

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

    I normally use grid for site layout and flexbox for UI layout but there are always situations where one is just better to use for whatever reason. You can easily learn both on a weekend.

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

    For me (and I'm not familiar with all the properties of grid) the question is how does each display mode respond to changing screen size. With flex things wrap fairly readably using auto widths even if the font size changes. With grid you have a nice layout but only for a range of screen size - the one grid layout won't be usable for *all* screen sizes. A media query has to be used to change the grid layout when content is too big or too small. So more @media code is the price for using grid, despite its greater potential in 2D layouts.

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

      Exactly, I would be happy to have this specific topic in the video…

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

    I was researching flexbox and came across this. It’s really great to know that grid is available

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

    i just love your videos man, so helpful! keep up this awesome work of yours! thanks :)

  • @luluu-hh6ih
    @luluu-hh6ih 2 ปีที่แล้ว

    We can use two this amazing things , let's say that in header we can use possibly flex .But in the table of blocks we can use Grid , and also we can practically don't use adaptive if we make adaptive markup .

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

    thank you so much on the explanation i was wondering what the heck is grid and now i know i can rely on both i was fighting with flex so much

  • @HerrUns
    @HerrUns 5 หลายเดือนก่อน

    Love the way you teach, bro! Thank you!

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

    I don't understand why people always confuse these two properties. They look different. I use flexbox when I need to get a table of tiles of the same size, and automatically wrap items if there isn't enough space. The grid is used for components where I want the elements to be aligned both vertically and horizontally. This can't be done with flexbox alone if you have a dynamic number of rows or columns. The grid also works well for the entire page layout. The so-called tabular layout. On flexbox, doing the same is much more difficult.

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

    Absolutely great explanation of flex and grid. Loved it! :)

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

    Excellent visualization and explanation. You're like the Adam Ragusea of programming :D

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

    Use grids if you want a nice, organized structure, like a gallery or list of services.
    Use flexbox when you want a bit more control over spacing, alignment, or want a layout that changes naturally based on screen size.

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

    Thank you for the high quality content, Kevin!
    Curious, what do you use for recording your videos? I love how your headshot view adjusts in the screen to make more of the screen visible!

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

    Intrinsic sizing vs extrinsic! Love it!

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

    So a grid is griddy and flex is flexy :p
    On a serious note, this is a great video that explains the differences really well. Amazing

  • @-Wust-
    @-Wust- 2 ปีที่แล้ว

    Fantastic video. Love the "focus on intrinsic sizing" approach.

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

    I don’t know how or where I stumbled upon your channel but I love it. I’ve watched a few of your shorts as well and everything is always explained clearly without “showboating” jargon that isn’t necessary. I’m at grid in my learning currently so finding this video is perfectly timed!

  • @lorenainfanter.3099
    @lorenainfanter.3099 2 ปีที่แล้ว

    Thank you! It really helps me to have a better understanding about this topic.

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

    I just watched you’re old video about this topic form 2019 and thought: “It would be nice if you posted an updated version”.
    What the heck man, your read my mind 😂

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

    freaking really good video my guy!

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

    exactly what i was looking for. Thank you!

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

    I was learning HTML when the very first version of CSS was proposed and never really did much with it. Having been introduced now through your videos to these concepts it is so intriguing. Doing this with a table in the early 90ś wouldǘe been impossible of course. Iḿ loving doing design again, thank you.

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

    This is really helpful, I'm just getting started and I am struggling with the CSS portion. I know in my head how I want it to look, I just don't know how to get it there.

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

    whenever you speak about css, it's sounds like a beautiful story. totally loved the video 😍

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

    Fantastic video with very clear examples . I finally understand the differences. You are awesome. Thank you so much 😊

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

    display: inline-block; works also fine for nav and tags if you don’t need extra fine tuning.

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

    I pretty much just use grid with grid-template-columns (and/or rows and/or areas) for just about everything.
    To me, Flexbox just works weird, and grid works more naturally for me.

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

    Nice vid! I love Flexbox. It's so useful. I use it on each and every web page, multiple times.

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

    Incredibly well explained!

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

    thank you so much! I'm studying my diploma in web development and Im designing a website with HTML/CSS for an assignment , so this helps a lot!!

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

    That was an awesome tutorial! I love the energy you bring to helping me learn these concepts. Thanks so much!

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

    Wow, I love your content, man! That's awesome 😮

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

    Wow ! Thank you Kevin :)
    This video is great. It's so well explained. You really helped me understand the differences between Grid and Flexbox.

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

    YOOO everytime I'm starting on a project for college wondering what i could use the css king himself comes on my subscription with answers!

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

    Thank you!! I really needed this explanation.

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

    To be honest, I rarely use Flexbox anymore. It's useful for when you don't care about the size of the content other than to fill up things, and for centering things (although Grid works wonders for this too). You can often get away with much less markup and CSS when using Grid.
    Flexbox will be more useful going forward however now that browsers support gap in Flex contexts as well.

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

    Great video, thanks. This is the first time I am seeing your channel. Something about you reminds me of Fox Mulder, but I'm now subscribed.

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

    Quite nice perspective. My scss file can often get bloated and hard to read. By switching my grid, it can help me centralize style and easier to read.

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

    Another great video sensei. I use Flex for menus and Grid for everything else. A perfect marriage.

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

    In short, flexbox is flexible and easy to add, but its frustrating as hell to use if you need boxes to be in places where you think it should be. I end up doing grids for more exacting work where I need things in specific spots on the layout and sometimes even use sub-grids instead of flexbox for more complex layouts within a grid. Flexbox is used only in places where I absolutely don't care about the position as long as its there roughly where I need it.

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

    I did some performance tests long long time ago and flex is way faster then grid. I ones said use grid for your layout stuff and flex for your components stuff. And I still believe that's true..

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

    Woww got different perspective for the flex-box with its intrinsic property !! thankss