One Line Of Code By Master CSS

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

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

  • @lundeveloper
    @lundeveloper  2 месяца назад +99

    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 2 месяца назад +6

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

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

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

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

      @@anshikatripathi3466 thanks 4 you correction 🙄.

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

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

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

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

  • @regibyte
    @regibyte 2 месяца назад +125

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

    • @jomoc6112
      @jomoc6112 2 месяца назад +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 Месяц назад +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 15 дней назад

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

  • @89marufomio66
    @89marufomio66 2 месяца назад +384

    bro is curing my mental health

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

      Like a miracle 😍

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

      @@lundeveloper Miracle Worker😅😅

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

    Bro is casually improving my skills 😢

  • @DemPilafian
    @DemPilafian Месяц назад +6

    You youngsters have it so easy.

    • @ikbenspeedy
      @ikbenspeedy 2 дня назад +1

      Frame set with table layout ftw

  • @luzzZq
    @luzzZq 2 месяца назад +32

    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.

  • @iamtr1stan
    @iamtr1stan 5 дней назад

    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!

  • @pedrogris
    @pedrogris 2 месяца назад +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 2 месяца назад

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

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

      Exactly, useless in real-life usages

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

      ​@@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 2 месяца назад +1

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

    • @N1rOx
      @N1rOx 27 дней назад

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

  • @kaltenstein
    @kaltenstein Месяц назад +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

  • @utvikler-no
    @utvikler-no Месяц назад +2

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

  • @EricFressange
    @EricFressange 2 месяца назад +19

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

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

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

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

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

  • @AK-fo6jj
    @AK-fo6jj 26 дней назад

    Great video, simple explanation, very good.

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

    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.

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

    🤯You are god of css

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

    This is top tier teaching right here. GODAMNNNNN.

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

    It's really just one line of CSS code

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

      ok but can you do that in minecraft also?

  • @emmanuelodewale
    @emmanuelodewale 2 месяца назад +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.

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

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

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

    Bro is reviving my interest in web dev 😂

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

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

  • @iftekharalammithu5128
    @iftekharalammithu5128 2 месяца назад +14

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

  • @kenthsaya-ang3718
    @kenthsaya-ang3718 2 месяца назад +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!

  • @MrQuantumCodes
    @MrQuantumCodes Месяц назад +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!

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

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

  • @zainuldin9095
    @zainuldin9095 2 месяца назад +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.

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

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

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

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

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

    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. ❤❤🎉

  • @Fralleee
    @Fralleee Месяц назад +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.

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

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

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

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

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

    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!

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

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

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

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

  • @SamuelKarani
    @SamuelKarani 2 месяца назад +10

    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.

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

    whoa. made me subscribe. good content

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

    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

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

    That was actually helpful. Thanks

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

    Bro you increased my interest in CSS also

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

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

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

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

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

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

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

      Thanks for watching my content ❤️

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

    Great bro ❤, keep sharing your experience and knowledge 😁

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

    Cool tech brother, leaving my sub!

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

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

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

    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.

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

    0:50 thought about subscribing 1:08 subscribed

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

    This is beautifully efficient. Bravo. 👏

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

    Excellent video thanks bro

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

    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.

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

    Very informative thanks alot

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

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

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

    Tks a lot. This is very useful

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

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

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

    I was searching this . Thank you

  • @zeedart2382
    @zeedart2382 24 дня назад

    Subed this was mind blowing 😮

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

    Dude I needed this in work!! Thanks

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

    I been looking for this for 4 years, thanks

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

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

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

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

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

      Glad this video was useful to you

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

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

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

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

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

    Bro loved it you earned a new subscriber ❤

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

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

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

    If you have a list that has 20 items, how do you prevent content inside the from flowing into the next column?

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

      Try setting it to display: block instead of inline-block :)

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

    damn those soundeffect are masterpiece

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

    I am super glad i watched this video ❤

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

    Thanks, this will help a lot. :)

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

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

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

    thanks, bro. your video is very helpfull to improving my skill

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

    Pretty dope, thank you for sharing this 🙂

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

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

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

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

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

      Thank you for watching my content ❤‍🔥

  • @jaymodi8744
    @jaymodi8744 23 дня назад

    Yoo this is mind blowing🎉🎉

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

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

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

      Thank you brother 😍❤️

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

    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!

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

    this is the best ever .
    So may thanks

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

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

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

      Thank you so much brother 😍

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

    Wow thanks for the tips !

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

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

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

    Bro is an angel😃😍

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

    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.

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

    Congrats on the 100k

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

    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.

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

    Thats awesome :D

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

    bro helps me keep my sanity while doing webdevelopment

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

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

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

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

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

    I needed you 2 years ago

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

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

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

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

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

    You are giving very useful resource video and I really like it

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

      Thank you bro 😍

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

      @@lundeveloper You're welcome bro, I'm expecting from useful videos 👍👍🙌🙌

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

    Absolutily amazing trick!

  • @AliSaeed-c6j
    @AliSaeed-c6j 2 месяца назад

    Greetings from Yemen , u have a unique content , ty for that

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

      Thank you so much brother, love Yemen

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

    Amazing know-how, thanks a lot!

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

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

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

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

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

    Great tutorial. Thanks for sharing.

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

    The best selling advertisement of your channel. Like and subscribe immediately! Thanks a lot