One Line Of Code By Master CSS

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

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

  • @lundeveloper
    @lundeveloper  4 месяца назад +101

    Is the video too short? If you find it interesting, don't forget to like and subscribe to watch interesting videos about programming and web design.

    • @adivsingh9753
      @adivsingh9753 4 месяца назад +6

      Bro can you please add something from 3js ... plzzz and animated related content..

    • @anshikatripathi3466
      @anshikatripathi3466 4 месяца назад +2

      Your videos are amazing and can you please bring some 3js content as well for animations...

    • @adivsingh9753
      @adivsingh9753 4 месяца назад +1

      @@anshikatripathi3466 thanks 4 you correction 🙄.

    • @ikbo
      @ikbo 4 месяца назад +5

      @@lundeveloper perfect length. Right to the point with no rambling

    • @LarsLinde
      @LarsLinde 4 месяца назад

      column-width:20em;
      Should do the same thing

  • @regibyte
    @regibyte 4 месяца назад +133

    Wow this is impressive! Years of CSS development and I never knew Masonry layout could be done that easily! Mindblown!

    • @jomoc6112
      @jomoc6112 3 месяца назад +15

      its new css feature supported only by latest browsers. thats why we did not know this before. the video forgot to said this important information

    • @t-m-r
      @t-m-r 3 месяца назад +5

      ​@@jomoc6112 No, it’s not new. This feature has been around for at least 10 years, and it wasn't designed for masonry layouts. It also has accessibility issues. However, a proper way to achieve this in a single line is expected to be available within 1-2 years.

    • @FukoHasStarfish
      @FukoHasStarfish 2 месяца назад

      ​@@t-m-rwhat are the accessibility issues?

  • @89marufomio66
    @89marufomio66 4 месяца назад +391

    bro is curing my mental health

    • @lundeveloper
      @lundeveloper  4 месяца назад +16

      Like a miracle 😍

    • @victorvakes
      @victorvakes 4 месяца назад +2

      @@lundeveloper Miracle Worker😅😅

  • @1More_Dreamer
    @1More_Dreamer 4 месяца назад +305

    Bro is casually improving my skills 😢

    • @lundeveloper
      @lundeveloper  4 месяца назад +9

      That's great. 😍😍

    • @victorekeocha4081
      @victorekeocha4081 4 месяца назад +2

      Likeee😂😂😂😂😂😂

    • @Chrispy77
      @Chrispy77 4 месяца назад +3

      Facts!

    • @datastatacian
      @datastatacian 3 месяца назад

      you mean robot?

    • @1More_Dreamer
      @1More_Dreamer 3 месяца назад

      @@datastatacian anyways, I felt better after that 🤣🤣🤣🤣

  • @luzzZq
    @luzzZq 4 месяца назад +33

    the funny thing is, that I encountered that type of problem about 2 weeks ago, struggled to somehow fix this and gave up on doing flex + media queries to split it into multiple cols when needed. That's a wonderful thing to know now.

  • @utvikler-no
    @utvikler-no 3 месяца назад +4

    Probably the best css tricks I’ve seen in many years.

  • @pedrogris
    @pedrogris 3 месяца назад +59

    The main issue with this is that images are not ordered "correctly"
    Instead of showing the first images at the top of the list it orders them form top to bottom in the first column, and then it shifts to the next one in the next column, meaning the first top images in the following columns will not be the first images on the list, despite that is a cool workaround when order is not crucial, great work!

    • @lucasfranco1758
      @lucasfranco1758 3 месяца назад

      what would be the easiest way to order them vertically/horizontally?

    • @SimonLaudati
      @SimonLaudati 3 месяца назад +6

      Exactly, useless in real-life usages

    • @marcduck111
      @marcduck111 3 месяца назад

      ​@@lucasfranco1758 I don't think there's a way to do it with only css right now, since the order depends on the height of the elements. You can use a library like masonic or masonry-layout, or use javascript to reorder the elements

    • @ben-brady
      @ben-brady 3 месяца назад +1

      Additionally, it has very low browser support so it's not usable rn

    • @N1rOx
      @N1rOx 2 месяца назад +1

      @@ben-brady It's showing browser compatibility across the board..

  • @DemPilafian
    @DemPilafian 2 месяца назад +8

    You youngsters have it so easy.

    • @ikbenspeedy
      @ikbenspeedy Месяц назад +1

      Frame set with table layout ftw

  • @kaltenstein
    @kaltenstein 3 месяца назад +5

    When I started with webdesign and development in 2013 when HTML5 and CSS3 was barely adopted and responsive webdesign was at it's emerge I CRAVED for such a feature. I remember hacking something together with CSS floats and dozens of lines in JS, calculating height, width, columns etc. Now it's finally there in a simple single line of code. I can die in peace

  • @aliabdullah4822
    @aliabdullah4822 4 месяца назад +4

    We need videos like this daily, this is just too awesome.

  • @mig8447
    @mig8447 3 месяца назад

    This is pure gold. If not too much to ask, I'm currently working with large lists and container-visibility, however, performance got worse than not using it in a list of 1000 elements. Would you be able to provide some insight on why and what to do to solve it?

    • @lundeveloper
      @lundeveloper  3 месяца назад

      First thank you for the gift.
      answer the question: In fact, when you use container-visibility in a list with too many elements, it will cause layout and rendering calculations to take place continuously, which will make the website lag, poor performance.
      Normally, with large lists, programmers will not use container-visibility, the two most popular options are paging or using Lazy Loading.

  • @lundeveloper
    @lundeveloper  4 месяца назад +10

    It's really just one line of CSS code

    • @rawallon
      @rawallon 4 месяца назад

      ok but can you do that in minecraft also?

  • @EricFressange
    @EricFressange 4 месяца назад +20

    Nice solution if the order of the cards is not important. thx

  • @kenthsaya-ang3718
    @kenthsaya-ang3718 4 месяца назад +28

    This would be a perfect solution if the order of images, whether vertical or horizontal, does not matter.
    The problem with this solution is when you wanted to order the images horizontally. If you can notice in the flex or grid method, the order of the first three images are horizontally laid. When it comes to the columns method however, the same images becomes ordered vertically.
    I think fixing this issue would involve using javascript to reorder elements/swap rows and columns. But there might be another set of problems for making it responsive lol. I'll think about it next time 😅
    Btw, great video as always!

  • @HaseebAdnan0
    @HaseebAdnan0 4 месяца назад +40

    What's crazy is that I was thinking this one was a very recent feature that probably isnt supported in many places.
    However, it's pretty much supported everywhere. I am mind-boggled why this is the first time I came across this.
    Thanks!
    To answer your pinned comment: the video is just the right length with enough information.

    • @lundeveloper
      @lundeveloper  4 месяца назад +1

      Thats crazy, right ? 😍😍😍

    • @fra4897
      @fra4897 3 месяца назад

      same here mate

    • @onça_pintuda999
      @onça_pintuda999 3 месяца назад

      Thought exactly about it, very impressive

  • @emmanuelodewale
    @emmanuelodewale 3 месяца назад +1

    I just love this channel funny enough just few days ago i was just telling a friend that i needed to learn this masonry layout (didn't even know what it was called at the time). I tried Both Flex and Grid but couldn't achieve the layout. I manipulated my way around it but it wasn't efficient. Long story short you've just improved my skill and made me a better developer Big thanks to you.

  • @zainuldin9095
    @zainuldin9095 4 месяца назад +4

    amazing! i can remember first time when I solve this problem I don't know I used almost 200 lines of ungodly javascript and I love the way it's working cuz we always need to add JS to make remaining space divided equally but not anymore.

  • @mateod700
    @mateod700 4 месяца назад +11

    I was thinking about my next projects, and this is what I wanted to do, u are amazing bro!

    • @lundeveloper
      @lundeveloper  4 месяца назад +1

      It's great that this video is out there right when you need it ❤

  • @iamtr1stan
    @iamtr1stan Месяц назад

    Nawhh I was literally just making a casting pics gallery for my actor portfolio website, yesterday. Now this shows up in my recommend! I cropped all the images to different sizes to intentionally get this collage looking effect, only to realize it's harder to code than I expected. My first approach was to use three grid columns, too. This helps massively!

  • @iftekharalammithu5128
    @iftekharalammithu5128 4 месяца назад +15

    Every each video made me realize how much there is to learn.

  • @velocity0212
    @velocity0212 4 месяца назад +23

    🤯You are god of css

  • @luisfelipelino
    @luisfelipelino 3 месяца назад +2

    This is top tier teaching right here. GODAMNNNNN.

  • @SamuelKarani
    @SamuelKarani 4 месяца назад +11

    However the proposed masonry layout will be from left to right - columns are up down to the next column. In some cases this matters - in some, like yours, the direction of flow does not matter.

  • @mrselcet
    @mrselcet 4 месяца назад +17

    Video is not too short.
    The video is exactly perfect time.
    In one line :
    Man, you’re the best!!!

  • @ammarfarooqui8331
    @ammarfarooqui8331 2 месяца назад

    You got a new subscriber bro. I have started my web dev journey literally 10 days ago, and Still I am finding your videos helpful.

  • @mrastrogastro
    @mrastrogastro 3 месяца назад +1

    Thank you! So refreshing, I am younger 5 years now! 😊

  • @petarkolev6928
    @petarkolev6928 Месяц назад

    Bro, amazing! I am instantly subscribing!

  • @DoggoDebugger
    @DoggoDebugger 3 месяца назад

    as a backend dev I find it fascinating that you can do that in CSS, great stuff!

  • @blasefiber8285
    @blasefiber8285 3 месяца назад

    Man, you are the best web design yt for real, terrific work, keep it up

  • @tridibeshnag782
    @tridibeshnag782 4 месяца назад +1

    I have subscribed just watching 2 videos that came on my feed randomly. And you have earned it!

    • @lundeveloper
      @lundeveloper  4 месяца назад +1

      Thank you brother 😍❤️

  • @TomGirshovsky
    @TomGirshovsky 3 месяца назад

    Dude I've been looking for this tutorial for months!!! Thanks dude!

  • @brainheap
    @brainheap 3 месяца назад +2

    great video, it's feels like
    "hey I've seen this one. this is a classic"

  • @TechnicalSecret-sz1my
    @TechnicalSecret-sz1my 25 дней назад

    bro your sound effects yrrr Literally epic

  • @georgikyshenko4380
    @georgikyshenko4380 4 месяца назад

    Again, the best channel for CSS tips and tricks in details. A lot of hours long courses don`t teach the little things and you are doing it, so its awesome. You are great!

  • @Melynt
    @Melynt 3 месяца назад

    Oh my god, nothing excites me like this kind of things, which i did not know, i'm genuinely happy. GJ sir
    Take my sub!

  • @MrQuantumCodes
    @MrQuantumCodes 3 месяца назад +1

    Masonry layout has always been a problem to me. There are entire libraries to handle this layout, I didn't know this was that simple. Thank you!

  • @shubhangpathak2573
    @shubhangpathak2573 3 месяца назад +1

    Bro is reviving my interest in web dev 😂

  • @hllalahi
    @hllalahi 3 месяца назад

    I have been looking for this for a long time until I gave and realized it's no way. 😁 I just saw this today by chance. Thanks for the helpful content. ❤❤🎉

  • @high_limits
    @high_limits 3 месяца назад

    Bro, I didnt search for this but this is gold. Thanks!

  • @mujibulhaquetanim
    @mujibulhaquetanim 4 месяца назад

    Wow! I've tried it with Tailwind CSS, and it completely transformed the vibe of the webpage-thanks, man. I love learning tricks and tips like this; please share more.

  • @2difficult2do
    @2difficult2do 4 месяца назад

    You are always show coll and useful css tricks. Thank you. Wish you more subscribers!

  • @wolfiling
    @wolfiling 4 месяца назад

    5 Minutes. 3 different ways with cons and pros. Wow.
    (Thanks! ❤)

  • @a.anvarbekov
    @a.anvarbekov 4 месяца назад

    congrats on 100k!
    first time watching u
    and i like it!

    • @lundeveloper
      @lundeveloper  4 месяца назад

      Thank you so much brother 😍

  • @azizkira7505
    @azizkira7505 4 месяца назад

    I been looking for this for 4 years, thanks

  • @david1801
    @david1801 4 месяца назад

    And I was just struggling with making Masonry yesterday, you're a genius.

  • @sachindeveloper831
    @sachindeveloper831 2 месяца назад

    Dude u cured my trauma about learning css perfectly 😢😢😢😢❤❤❤❤

  • @WiserMiser
    @WiserMiser 3 месяца назад

    Whole new level of css for backend engineer who do something front end

  • @mista_odie
    @mista_odie 3 месяца назад

    You appeared on my front page randomly, and it piqued my curiosity. Good content. 👍
    Enjoy your well earned sub (though you're now above 100k subs)

  • @adamstuartclark
    @adamstuartclark 3 месяца назад

    Great tip, columns never got the love it deserved when it came out nearly two decades ago. Wonder if you can use a gap property like in grid/flex.

  • @AK-fo6jj
    @AK-fo6jj 2 месяца назад

    Great video, simple explanation, very good.

  • @harshitasharma8099
    @harshitasharma8099 4 месяца назад

    Thank you so much for this tutorial. This just pooped up in my YT feed at the right time. 😎

  • @joselife-on4029
    @joselife-on4029 4 месяца назад

    You are original and that why the peopple follow you, PD I like the gas/winds. Greetings from Argentina

  • @cleyxds
    @cleyxds 4 месяца назад +4

    i always watch your videos laughing, because I know there will be these random sfx 😂😂
    Good content bro 👊

  • @Trendi_Vibes
    @Trendi_Vibes 3 месяца назад

    Great bro ❤, keep sharing your experience and knowledge 😁

  • @knecks7374
    @knecks7374 3 месяца назад

    Oh. My. God.
    I avoid CSS but tomorrow i'll dive headfirst into it all because of you!!

  • @licokr
    @licokr 4 месяца назад

    I subscribe your channel right away. Crazy and easy to understand your explanation 🐐

  • @gerardoivanriosgonzalez4612
    @gerardoivanriosgonzalez4612 4 месяца назад

    This is huge, I been struggling with this type of layout for months.

    • @lundeveloper
      @lundeveloper  4 месяца назад

      Glad this video was useful to you

  • @santiagovalencia6658
    @santiagovalencia6658 3 месяца назад

    Dude I needed this in work!! Thanks

  • @monsieurkeyboard
    @monsieurkeyboard 4 месяца назад

    Just subscribed because of the sound fx because I already knew about columns in css.
    Great tutorial tho 👍🏻

  • @Deep_X_00
    @Deep_X_00 Месяц назад

    Thank You Bro. You Gained Another Subscriber.

  • @ZeeshanAhmad-el9ye
    @ZeeshanAhmad-el9ye 3 месяца назад

    Bro you increased my interest in CSS also

  • @yusrildhm
    @yusrildhm 3 месяца назад

    This is crazy. Thanks for the tip. I’m gonna use it on my gallery page.

  • @migionie
    @migionie 4 месяца назад

    THANK YOU, big fat THANK YOU!! I'll implement that in future projects!

  • @Fralleee
    @Fralleee 3 месяца назад +1

    As some people already have mentioned, the ordering causes issues. A lot of the time masonry layout is used with infinite querying to load more images/content. This causes a reordering of the layout and doesn't position the elements correctly.
    Only useful if you have static content with masonry which is kind of rare.

  • @glennwarindu4580
    @glennwarindu4580 4 месяца назад

    Thank God I came across your channel,you're a genius

    • @lundeveloper
      @lundeveloper  4 месяца назад

      Thank you for watching my content ❤‍🔥

  • @shivamisrani6269
    @shivamisrani6269 3 месяца назад

    Bro loved it you earned a new subscriber ❤

  • @philathea
    @philathea 3 месяца назад

    Your content is rare gold.
    Looks like i am watching coding anime 😂❤

  • @albin_joby
    @albin_joby 4 месяца назад

    bro helps me keep my sanity while doing webdevelopment

  • @தமிழோன்
    @தமிழோன் 3 месяца назад

    Awesome video as usual. And, by the way, this AI voice is perfect for the channel and its style. Please keep using it until something better comes up.

  • @LeniconDev
    @LeniconDev 3 месяца назад

    Bro spawned in with what I was struggling with the most

  • @shinobi77
    @shinobi77 3 месяца назад

    I remember back in 2010, the struggle to make a simple layout and hacks to support browser compatibility 😭 it was a pain in the heart 💔

  • @khouchanemahmoud9475
    @khouchanemahmoud9475 4 месяца назад

    Thanks dud i always wonder how this works and finaly i get to see it with simple code 😊

  • @romeiyu3491
    @romeiyu3491 3 месяца назад

    trong tất cả kênh hướng dẫn CSS cao cấp thì em thấy channel này là hay nhất

  • @bungadicode
    @bungadicode 3 месяца назад

    SCSS safe my live. but this guy content make me level up.

  • @zarkive43
    @zarkive43 4 месяца назад

    I was searching this . Thank you

  • @nikhilchandraroy1094
    @nikhilchandraroy1094 День назад

    Unbelievable, thanks

  • @DreamPirates
    @DreamPirates 4 месяца назад +1

    Thanks, this will help a lot. :)

  • @khaledMohamed-tp4wx
    @khaledMohamed-tp4wx 3 месяца назад

    That was actually helpful. Thanks

  • @biogesicc0808
    @biogesicc0808 3 месяца назад

    whoa. made me subscribe. good content

  • @Sinner100
    @Sinner100 4 месяца назад

    What a customized environment ✨
    ...
    I love if you share the customization video for VS code brother ❤.

  • @kitamashi
    @kitamashi 4 месяца назад

    bro WHAT i overcomplicated this SO MUCH in comparison, thank you for sharing! I watch your channel since the beginning and I am so glad that you are consistent with the quality. Also, thanks for changing the AI voice! I didn't like the old jimmy alike voice, even more since all that stuff about him went public. Cheers!

  • @jaymodi8744
    @jaymodi8744 2 месяца назад

    Yoo this is mind blowing🎉🎉

  • @indianlion9652
    @indianlion9652 3 месяца назад

    I am super glad i watched this video ❤

  • @thatgeezeruk
    @thatgeezeruk 4 месяца назад +2

    Watching this and you're on exactly 100k

  • @minhtrong6036
    @minhtrong6036 4 месяца назад

    100k sub rồi, chúc mừng chú 🎉

  • @FightFookingClub
    @FightFookingClub 3 месяца назад

    Bro is an angel😃😍

  • @kioveil2577
    @kioveil2577 3 месяца назад

    damn those soundeffect are masterpiece

  • @xilliman
    @xilliman 3 месяца назад

    Nice idea. Masonry grids still have accessibility issues because the tab navigation can be different to what you would expect.

  • @Nosdiac
    @Nosdiac 4 месяца назад

    this is so helpful thank you for this type of Content,

    • @lundeveloper
      @lundeveloper  4 месяца назад

      Thanks for watching my content ❤️

  • @joao.porttella
    @joao.porttella 3 месяца назад

    I needed you 2 years ago

  • @adivsingh9753
    @adivsingh9753 4 месяца назад +1

    Love ❤️ you brother , you really help by your contact...❤❤❤❤❤

  • @alancrisanto8417
    @alancrisanto8417 2 месяца назад

    Excellent video thanks bro

  • @Younex
    @Younex 4 месяца назад

    Thank you ❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥

  • @zeedart2382
    @zeedart2382 2 месяца назад

    Subed this was mind blowing 😮

  • @Backwo0dz
    @Backwo0dz 4 месяца назад

    Congrats on the 100k

  • @maheshj01
    @maheshj01 17 дней назад

    This is a simplest solution but mind that if you plan to use lazy loading or infinite scrolling where you add new elements to the list as you scroll then the columns will redistribute the elements to fit which will give a very bad experience. Regardless this is great approach if your list is not changing after first render.

  • @ukaegbugreatjnr
    @ukaegbugreatjnr 3 месяца назад

    Wtf bruhhhh😂😂😂
    Am having special headaches rn 😮😮

  • @guxit
    @guxit 3 месяца назад

    Generally in masonry layouts, you want the "first" elements in the list nearest the top. This method stacks things sequentially, so the 3rd item from the left might be the 400th item in the list. The stacking can also look "off" if the object sizes vary a lot. It's cool though, I've used it before.

  • @mrvfino
    @mrvfino 3 месяца назад

    Oh god i'm creating a small website builder app, this is so gonna be helpful for the themes. Thanks 😭

  • @youtubeneedsfix
    @youtubeneedsfix 3 месяца назад

    May be I am late to the party but congrats on crossing 100K subs. 🎉