The most underappreciated CSS property

  Рет қаралды 70,614

Kevin Powell

Kevin Powell

Күн бұрын

Пікірлер: 145
@PenguinjitsuX
@PenguinjitsuX 2 жыл бұрын
This was a great video! I was making columns of different card divs and this helped. Something to note is that with card style divs, columns by default will split your card into 2 pieces when pushing it from the end of one column to the next (the beginning of the div will be in the first column while the second part of it gets pushed on to the next column). To make sure each entire card stays in it's own column, you have to use "break-inside: avoid-column;" on the card class.
@ilearnforever
@ilearnforever Ай бұрын
or set break-before:column to the card element
@zaboogoosfraba6699
@zaboogoosfraba6699 6 жыл бұрын
What makes this video great it is short and I learned something new ! Thanks again K.P
@KevinPowell
@KevinPowell 6 жыл бұрын
Awesome, glad to hear that John :).
@peenoise363
@peenoise363 3 жыл бұрын
Me too KP more power!! I never use this method thanks for sharing 😁
@MegaRomull
@MegaRomull 3 жыл бұрын
10 October, 2021 now firefox supports columns property :))))) I'm shocked with my ignorance 'cause 20 years I played anyway with CSS and nether used it... Thank you, Kevin!
@oxysoxos
@oxysoxos 6 жыл бұрын
I really like those short videos on some cool CSS features many beginners or intermediate coders might not be quite familiar with. Keep it coming, please. Personally, I would love to watch another in depth video about columns.
@KevinPowell
@KevinPowell 6 жыл бұрын
Glad you're appreciating these videos oxysoxos! I'll do one in a little bit, as they work really well with CSS Grid, and I think it's worth taking a look at that.
@konraddariuszwoloszyn9206
@konraddariuszwoloszyn9206 6 жыл бұрын
Are You kidding me, Kevin? Why does nobody talk about CSS columns? That is such a great property and I never heard of it before. So, thanks a lot for creating this vid! Im not sure if You should do another video on this topic. Use cases are obvious. Maybe move on to another, interesting topic?
@KevinPowell
@KevinPowell 6 жыл бұрын
I don't know why they aren't talked about or used more often, as you said, they are pretty cool. Do check how it's working in different browsers though, it's not always super consistent in where the columns break.
@chrisskjrvik4568
@chrisskjrvik4568 4 жыл бұрын
This is such a life saver! I've tried multiple books and web resources to understand columns, but it all went in one ear and out the other. But this made complete sense!
@StarOnCheek
@StarOnCheek 2 жыл бұрын
There is no way! This is so useful!!! This is much better than grid or flexbox is so many situations. How have I never heard about this???
@ilearnforever
@ilearnforever Ай бұрын
Literally isnt it? I thought the same when I learned about this property. Since then, I've been playing with it.
@yousseftijdit
@yousseftijdit 5 жыл бұрын
Oh my ! When nobody mentions this property, you're the only one to do it. it helped me save lots of time instead of always using the "display:table/table-cell". Thankies !
@CAbbott71
@CAbbott71 2 жыл бұрын
Thank you. I have been bashing my head against a wall trying to find a solution to the layout I want, and this feature does it. Too Easy!
@germanbaena6579
@germanbaena6579 Жыл бұрын
Kevin, esto es maravilloso, que locura de propiedad CSS , pero lo que más me desconcierta es que ya hace cinco años lo habías enseñado... carajo, ¿dónde estaba yo? Mil Gracias!
@davidheidari2188
@davidheidari2188 Жыл бұрын
I like your voice and the pace of your explanations!
@CyberTechBits
@CyberTechBits 3 жыл бұрын
Wish I knew this feature a year ago! Fantastic! It's responsive without flex or grid! Great tutorial Kevin! You rock my friend!
@elkhanhamet2561
@elkhanhamet2561 6 жыл бұрын
Ohhhh Kevin you're a lifesaver, I've spent literally entire night trying to to get this working properly, but when I was resizing things would start fall apart meanwhile seeing how perfectly well it was working on other people's sites. And your video solved it all. I would give you a golden medal for that.👏👏👏👍👍😊🙃
@snakemanluffy7645
@snakemanluffy7645 3 жыл бұрын
1 year ago one of my client wanted me to make such column layout. I was confused! . Couldn't find the the solution because I didn't know about it. But then my client informed me about it. I was surprised! It's really underrated.
@mascatrails661
@mascatrails661 3 жыл бұрын
Man, this is pretty amazing! Laughed when you straight up called it sexy
@natalieacevedo4575
@natalieacevedo4575 2 жыл бұрын
Amazing content as always, thanks so much Kevin, you are the best!.. love from Portugal :)
@DaveMcGarry
@DaveMcGarry 6 жыл бұрын
Wow great stuff again Kevin!
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks David!
@sergei_sg
@sergei_sg 2 жыл бұрын
Thank you for the video, Kevin! It's very useful!
@najmantube
@najmantube 2 жыл бұрын
End of 2022: works equally well on Edge/Firefox/Chrome (Windows 10). Works pretty well with images too (although there can be awkward layouts at certain sizes). Very useful, thanks (and Merry Christmas / Happy New Year)!
@k.chriscaldwell4141
@k.chriscaldwell4141 3 жыл бұрын
The 3 Ss: Short, Sweet, and Superb. Thanks.
@devincenatiempo2238
@devincenatiempo2238 6 жыл бұрын
This is going to make me a hero at work! I love your videos, they are incredibly helpful. Keep it up!
@KevinPowell
@KevinPowell 6 жыл бұрын
Hah, awesome, glad you liked it Devin!
@drviagrin3798
@drviagrin3798 Жыл бұрын
So nice and responsively powerful!
@shariquekhanoriginal
@shariquekhanoriginal 6 жыл бұрын
Solved my many problems from this! Thankyou Kevin! 😊
@KevinPowell
@KevinPowell 6 жыл бұрын
That's great to hear SK Technohub!
@sashatv138
@sashatv138 4 жыл бұрын
Amazing video! Thank you, Kevin! As always!
@martumbao2760
@martumbao2760 6 жыл бұрын
Thanks kevin.. Looking forward for some videos like this. Very helpful to me.. 😊
@CGEarts
@CGEarts 6 жыл бұрын
your voice makes my synapses tingle. also found this usefull! good job
@KevinPowell
@KevinPowell 6 жыл бұрын
Glad you like my voice Chris! And the video, of course!
@jessicahancock1755
@jessicahancock1755 5 жыл бұрын
Wonderful! So quick and well explained, I appreciate it!
@СашаТюменцев-ш9ь
@СашаТюменцев-ш9ь 2 жыл бұрын
thanks for the explanation, i like these rare properties!!!
@chunk1978
@chunk1978 5 жыл бұрын
From Firefox version 65: CSS column-span is behind the "layout.css.column-span.enabled" preference, which needs to be set to true. So now, at least, it's behind a flag so we should see full support soon/whenever/never.
@ninoid51
@ninoid51 5 жыл бұрын
Brilliant video! Straight to the point and informative! Cheers :)
@EricHillAuthor
@EricHillAuthor 5 жыл бұрын
Wow. What a secret? This is fantastic! Thank you, Kevin.
@tigochi
@tigochi 10 ай бұрын
I wonder whether there's a way of positioning and keeping text elements at absolute top of a column when there's for example a browser window stretching ...
@karenrawson4930
@karenrawson4930 3 жыл бұрын
This blew my mind. Where have you been all my life?
@ArctimConsult
@ArctimConsult 5 жыл бұрын
I love your video, very explicit. Keep it up.
@adamlacasse4679
@adamlacasse4679 3 жыл бұрын
I was today years old when I found about this. Thanks!
@producermind9030
@producermind9030 3 жыл бұрын
Wow. Definitely undervalued.
@rmcellig
@rmcellig 4 жыл бұрын
Wow! What an excellent video!! Thanks!! 😁
@seemsas
@seemsas 6 жыл бұрын
I used columns a while back but totally forgot ist meanwhile. Thanks for the heads up. I would appreciate some usecases especially in combination with grid or flexbox
@KevinPowell
@KevinPowell 6 жыл бұрын
Yeah, I don't use them too often either. I'll try to come up with a few fun ways to use them, though it probably won't be next week.
@chome4
@chome4 3 жыл бұрын
If a column has a heading, how do you get that heading stay 'fixed' at the top and the text underneath it to stay with it? ie, no matter what width the page, the heading will always be a the top.
@jonathanhammond5563
@jonathanhammond5563 2 жыл бұрын
Hi Kevin, one unfortunate aspect of columns I could not use was making cards. I am basically replicating tumblr and how it has somewhat of a masonry layout, 2-columns where the image/content dictates the height of the card, but the width is always the same. In this case, I actually had a card cut out from the left to the right, so the top of the card and image is on the bottom of the left column, and the right column has the rest of the image/card at the top. Basically the same as how you have your paragraph going from column to column
@alxhrrs
@alxhrrs 3 ай бұрын
Yeah colums are great but I'm having one problem that I can't find a solution to: a faq's page with about 50 faqs, each with a simple layout, just question and answer, BUT...they are collapsibles. When I quick on a few faq items in the left column, the last one in the left column shifts to the right column. I can't figure this out. Does anyone know what I'm doing wrong??
@mangouni
@mangouni 2 жыл бұрын
Great video! Did you do a deep dive into columns? :)
@marcelocrocco8133
@marcelocrocco8133 6 жыл бұрын
Thank you for the video, very good explained. Thank you for sharing. There´s another property of "columns" called "column-fill" which controls how the text fills the columns (balance, auto, initial).
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks, Marce! I'll make sure to mention that when I do my next video on columns and using it with CSS grid 👍
@Ahrysa
@Ahrysa 2 жыл бұрын
I wish I knew this before setting up my restaurant site for class lol. My divs keep disappearing n being sent to eeby deeby instead of stacking in a column at mobile size
@caigner
@caigner 3 жыл бұрын
I need two columns and a floating image on the right side of the second column, with text flowing around the image. Any suggestions on how I could accomplish this?
@Binyamin1444
@Binyamin1444 4 жыл бұрын
But what if you want your columns to start at a certain point in the paragraph, rather than mid sentence..? Or did I miss something
@iliketocode6986
@iliketocode6986 3 жыл бұрын
Interesting can you reverse them on different t break points?
@stevenstordal251
@stevenstordal251 4 жыл бұрын
I really liked this approach, and got the code from code pen :) But when I check my page on an iPhone, the columns don't change, I still have 3 columns, but with really small text. I realize that it's possible to add media-info in css, but I thought the point of this was that I didn't need to. Did I miss something?
@najmantube
@najmantube 2 жыл бұрын
Have you got in the section of the HTML page?
@junaihd2743
@junaihd2743 3 жыл бұрын
Love from Kerala India ; Love you so much ;
@joemcfadyen3500
@joemcfadyen3500 5 жыл бұрын
what is the font family of the heading that reads css colums
@MyNegativeCreep
@MyNegativeCreep 4 жыл бұрын
Does Firefox support column-span in 2020? Or still not?
@KevinPowell
@KevinPowell 4 жыл бұрын
Seems to, yup
@MyNegativeCreep
@MyNegativeCreep 4 жыл бұрын
@@KevinPowell Thanks.
@salehmajeed
@salehmajeed 5 жыл бұрын
Hey Kevin thanks a lot. Does it work the same for images & texts columns?
@tbdrosa8542
@tbdrosa8542 4 жыл бұрын
thus was very helpful, thank you for this !! With this same technique do you know if it's possible to make three columns - but to keep the text separated so they stay within their own designated column?
@coreyf9475
@coreyf9475 4 жыл бұрын
Soooo, let's say I want 3 columns. The first column is to be black, the second column will hold a logo, the third column will be black. Also, I want to link from index.html to mystyle.css. I can not find how to do that anywhere.
@listiy4700
@listiy4700 3 жыл бұрын
how do i make columns with links ?
@kaifscarbrow
@kaifscarbrow 3 жыл бұрын
Awesome. This would have made it easier to achieve that design I'm working on(specifically with the break-inside: avoid), if only the individual columns could be styled
@domanickharper
@domanickharper Жыл бұрын
This seems like the beginning of a quick and dirty site build. Having the header and its' content span all while the rest of the site or sections of ther site are columns and then there's not a big need to worry about the screen size so long as the minimum width is set to the screen size of a phone
@najmantube
@najmantube 2 жыл бұрын
I recommend p { word-wrap: break-word;) to avoid overflow problems with long words.
@MathinusG
@MathinusG 2 жыл бұрын
Can one insert images into this?
@afsanazamannipa7711
@afsanazamannipa7711 5 жыл бұрын
Please do more videos on deep use cases about column property. Thank You for this video.
@KevinPowell
@KevinPowell 5 жыл бұрын
I find it a ton of fun, but I haven't been using it a ton lately. If I run into a good use case, I'll definitely look into making a video on it.
@NixTheG0at
@NixTheG0at 6 жыл бұрын
hi kevin,ty for your great work, one question, if we can create columns with this property,so why we need other things like flex box and grid or floating elements ? is it posible to just use this column property instead of those? thank you
@KevinPowell
@KevinPowell 6 жыл бұрын
It doesn't really give us the same type of control. It's to take one block of content and split it up (you could even have a grid split across columns!). It has it's uses, but it's not really to control the big picture of a layout.
@NixTheG0at
@NixTheG0at 6 жыл бұрын
ty kevin :x
@shariquekhanoriginal
@shariquekhanoriginal 6 жыл бұрын
I have an error please someone solve! When my screen size gets small my paragraph goes over the picture beside it! I have used columns, max-width too and display flex and grid also i had tried please help
@KevinPowell
@KevinPowell 6 жыл бұрын
Could it be that the image is spilling out of it's parent? If a div (or anything else) is narrower than the image, the image simply falls out the side. You could use 'overflow: hidden;' on the parent of the image.
@shariquekhanoriginal
@shariquekhanoriginal 6 жыл бұрын
Kevin Powell ok i ll try that and let you know if doesnt gets correct~
@shariquekhanoriginal
@shariquekhanoriginal 6 жыл бұрын
Kevin Powell nope it didnt work out text is going on image shud I do position relative?like for both image and text?
@MdShahid-pj5uo
@MdShahid-pj5uo 6 жыл бұрын
thanks Kevin. but can i use css columns in Bootstrap 3.7?
@KevinPowell
@KevinPowell 6 жыл бұрын
As Shaurya said, there is no reason you can't. You can do anything with Bootstrap, it's just a big CSS file, and you use what you want from it effectively.
@MdShahid-pj5uo
@MdShahid-pj5uo 6 жыл бұрын
Yes i can do anything... thanks Kevin..
@luiz.henrique9
@luiz.henrique9 3 жыл бұрын
Great video, thanks! A nice use case is creating a feed like Pinterest.
@ОлександрТимощук
@ОлександрТимощук 6 жыл бұрын
Good video. Thank you
@KevinPowell
@KevinPowell 6 жыл бұрын
No problem!
@milleniummoses
@milleniummoses 6 жыл бұрын
I'm thinking, if need be, I could do some hackey stuff and use it either in combo with or in lieu of Grid
@KevinPowell
@KevinPowell 6 жыл бұрын
Interestingly, a grid cell can break over columns. I'm trying to find a use for it and to make a video about it. So far, not sure, but it seems cool.
@inglesdegraca6730
@inglesdegraca6730 3 жыл бұрын
Awesome!!
@nathancornwell1455
@nathancornwell1455 5 жыл бұрын
this almost kinda seems like declaring display:flex; .. i mean of course you clearly have more control over the content with flexbox in general but i do like the idea of not needing a media query .
@milanm6538
@milanm6538 6 жыл бұрын
Thank you, very well explained! Can you do one short video about svg in your way
@KevinPowell
@KevinPowell 6 жыл бұрын
Is there anything specific about SVG you'd like? I tried to get into it, but I only know the very basics.
@vukosavljeva
@vukosavljeva 6 жыл бұрын
Wow, what a great vid. Didn't know about this... Thanks a lot! It would be nice if it could be applied to div's, aswell :D
@KevinPowell
@KevinPowell 6 жыл бұрын
It can be! You could have 20 cards automatically placed into columns, which is fun. It could give you a Pinterest style layout without much trouble, really.
@vukosavljeva
@vukosavljeva 6 жыл бұрын
Wait, so you can give a "columns" property to a div? And it acts like a paragraph in this video? Wow...that's cool :D Why even bother with flex box or floats and margins, when it comes to simple designs were you need them to stack next to each other. :D
@KevinPowell
@KevinPowell 6 жыл бұрын
One issue is the order things go in, since things are sorted in columns, instead of left to right: codepen.io/kevinpowell/pen/ZxYzNb?editors=1100 - this can be good for text, but depending on your layout, can be bad for cards, or things that should be seen in a specific order.
@vukosavljeva
@vukosavljeva 6 жыл бұрын
Kevin Powell Yeah, I get it. Good to know, though! 😊
@rporta
@rporta 3 жыл бұрын
thank you
@Sugurous
@Sugurous 3 жыл бұрын
Thanks
@samwoodward8031
@samwoodward8031 5 жыл бұрын
Hi Kevin, looking at caniuse and it says it has full Firefox support... Maybe Im looking wrong. caniuse.com/#search=columns
@KeksBln
@KeksBln 3 жыл бұрын
2018 vs. 2020
@iliketocode6986
@iliketocode6986 3 жыл бұрын
They aren't used because big production builds use libraries like bootstrap
@gyanendrarawat5421
@gyanendrarawat5421 3 жыл бұрын
Awesome
@bmehder
@bmehder 4 ай бұрын
How relevant is this in 2024? Is grid auto-fit a preferred solution now?
@isaacbaptista6207
@isaacbaptista6207 3 жыл бұрын
Columns deep dive please
@pradeepn7
@pradeepn7 4 жыл бұрын
So GOOOOOD, why the hell use GRID ?
@dancarter6044
@dancarter6044 3 жыл бұрын
Columns are boss!
@inayathkhan100
@inayathkhan100 4 жыл бұрын
Vee useful tutorial
@tharakakarunarathne5346
@tharakakarunarathne5346 2 жыл бұрын
Firefox now supports this. :)
@strudast
@strudast 2 жыл бұрын
WOW goodbye bootstrap grid, goodbye media queries! lol! thats awesome AND sexy as you said it!!
@normanejm
@normanejm Жыл бұрын
Thanks!!!!!!!!!!!!!!!
@shariquekhanoriginal
@shariquekhanoriginal 6 жыл бұрын
Deep dive into media queries please! #newvideo
@KevinPowell
@KevinPowell 6 жыл бұрын
I have a very short video on them, but it's the opposite of a deep dive, lol. I'll add it to my list.
@code.cracking
@code.cracking Жыл бұрын
GREAT, is this still useful today, becz it's the first time i see such a thing.
@daves516
@daves516 4 жыл бұрын
i love YOU!
@plnit2784
@plnit2784 3 жыл бұрын
4:34 Am I the kitten?
@greg6094
@greg6094 3 жыл бұрын
I've found it to be very flaky in real world use: lots of alignment issues if a list is split into columns using CSS.
@KevinPowell
@KevinPowell 3 жыл бұрын
You might want to look into the avoid-break property to go with it. Most of the issues revolve around an element splitting 2 columns, or even just it's margin going across them. It's not perfect by any means, but that can go a long way.
@summonshr
@summonshr 6 жыл бұрын
i would have supported in patreon but it is not possible from Nepal.
@KevinPowell
@KevinPowell 6 жыл бұрын
Don't worry about it at all summon!
@AnimeRPG1
@AnimeRPG1 6 жыл бұрын
FireFox does support columns: developer.mozilla.org/en-US/docs/Web/CSS/columns
@KevinPowell
@KevinPowell 6 жыл бұрын
Did I say it doesn't support it? Sorry, the I made this awhile ago and don't remember. I might have said it has partial support, as it doesn't support break-before and break-after, which it still doesn't support - developer.mozilla.org/en-US/docs/Web/CSS/break-after
@ZahinAbdullah
@ZahinAbdullah 6 ай бұрын
good explanation. although it doesn't work as I thought. ;(
@robertshaw4990
@robertshaw4990 3 жыл бұрын
🤯
@techtipsuk
@techtipsuk 6 жыл бұрын
Not sure about sexy, you might need to get out more :-). Dead useful though, cheers
@KevinPowell
@KevinPowell 6 жыл бұрын
Hahaha, glad you liked it Richard :)
@frankroos1167
@frankroos1167 2 жыл бұрын
Master Kevin sounds like he missed some sleep. Or do I hear IPA? And even now, years later, we are still not talking about columns. Oh dear, "We don't talk about columns"......can make a really corny parody song out of that.
@theinvertedpineapple942
@theinvertedpineapple942 5 жыл бұрын
You know its good if internet explorer supports it.
@KevinPowell
@KevinPowell 5 жыл бұрын
IE10 fully supports it :)
@sm1ley732
@sm1ley732 5 жыл бұрын
this stuff is sexy lol :D nice video
@paalpaulsen
@paalpaulsen 20 күн бұрын
Found this use of columns very interesting also: kzbin.info/www/bejne/rmLUnX6sf8l7sKs&pp=ygUTY3NzIGNvbHVtbnMgbWFzb25yeQ%3D%3D
@TheFefiiiii
@TheFefiiiii 4 жыл бұрын
0:50 to not waste your fucking time
@stephenpetersen3607
@stephenpetersen3607 10 ай бұрын
I'm late to the party on this one
@ellisj98
@ellisj98 3 жыл бұрын
The only bad thing about this is controlling where the content cuts off
5 CSS mistakes that I see way too often
19:03
Kevin Powell
Рет қаралды 360 М.
Container Queries are going to change how we make layouts
24:24
Kevin Powell
Рет қаралды 178 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Learn CSS Grid in 20 Minutes
18:35
Web Dev Simplified
Рет қаралды 815 М.
CSS position deep dive
28:14
Kevin Powell
Рет қаралды 114 М.
I've been challenged to a CSS BATTLE by Web Dev Simplified
42:22
Kevin Powell
Рет қаралды 957 М.
One Line Of Code By Master CSS
5:45
Lun Dev
Рет қаралды 131 М.
Build Layouts with CSS Grid #2 - Multi-Column Layout
19:26
Net Ninja
Рет қаралды 46 М.
The new CSS pseudo-classes explained - :is() :where() :has()
13:50
Kevin Powell
Рет қаралды 145 М.
The secret to mastering CSS layouts
17:11
Kevin Powell
Рет қаралды 299 М.
Are You Making These CSS Height Mistakes?
8:54
Web Dev Simplified
Рет қаралды 140 М.
Floats, Flexbox, Grid? The progression of CSS layouts
27:00
Kevin Powell
Рет қаралды 289 М.