CSS Units: vh, vw, vmin, vmax

  Рет қаралды 204,715

Kevin Powell

Kevin Powell

Күн бұрын

Пікірлер: 246
@rawnoob2143
@rawnoob2143 6 жыл бұрын
Note to self: the difference between vw (or vh) and percentages is that vw and vh are relative to the viewport whereas percentages are relative to the parent element.
@samuelwong6352
@samuelwong6352 2 жыл бұрын
best comment ever
@adreenazea9015
@adreenazea9015 Жыл бұрын
@@samuelwong6352xh Cad Cb Vcr c km Gj X C nda ca c8 cm C V8c v pi bad H h Cah j bdi cb Fi bc8bcn Be gb ci vf cm c V
@adreenazea9015
@adreenazea9015 Жыл бұрын
Cg n IBM V 🐼c set gbf c ✨💎💎✨💎💎✨ 💎💎💎💎💎💎💎 💎💎💎💎💎💎💎 ✨💎💎💎💎💎✨ ✨✨💎💎💎✨✨ ✨✨✨💎✨✨✨ 8-) Vb G
@adreenazea9015
@adreenazea9015 Жыл бұрын
@@samuelwong6352 vbhb
@adreenazea9015
@adreenazea9015 Жыл бұрын
Bismillah vgg itu vv. Cgvj
@torstenschitkowski23
@torstenschitkowski23 Жыл бұрын
Thanks for all your work!
@KevinPowell
@KevinPowell Жыл бұрын
Thanks so much!
@nuttaphonr.6498
@nuttaphonr.6498 3 жыл бұрын
Thanks for great explaing :3 6:14 vmin 6:58 auto adjust padding based on vh 7:37 setting font size with vw 9:40 problem with setting font with vw and vh 10:54 using vmin to set fontsize (very useful)
@TheJacklwilliams
@TheJacklwilliams 2 жыл бұрын
Kevin, as I work through CSS and apply these things to a site I'm building (my portfolio site, etc...) I've found very quickly mastering what units to use for what elements is well, damn important. Thank you for the lesson(s).
@cgungm
@cgungm Жыл бұрын
Thank you, Kevin. You have a rare talent for explaining what could be very complicated into something more easily digestible.
@The-Heart-Of-It
@The-Heart-Of-It 2 жыл бұрын
A neat trick is to set the font size on the parent element to 1vw and then use em on the child elements to get everything responsive at different widths.
@antives8584
@antives8584 2 жыл бұрын
These videos are really changing the way I handle CSS design. My techniques was always based off from elementary courses all explaining the basics, however these are real world experience coupled with a great way of teaching! Thanks, Kevin, these videos are really helping me (and many, I'm sure) to become better developers :D
@ayo.eleven
@ayo.eleven 5 жыл бұрын
I just wanted to comment something as it helps grow the channel. Your tutorials are so awesome that there is hardly anything I can write here that doesn't make me feel silly :) Wish you lots of luck!
@sueholder703
@sueholder703 4 жыл бұрын
I have started using vw for my body font-size because I use rem and em's and I use vw vh for divs but this is a whole new level and so exciting. Thanks for bringing these tips that make everything make that much more sense. You definitely help make the corners of the web that much better. ;) See you in the next one!
@truefisherking
@truefisherking 5 жыл бұрын
I use: font-size: calc(Xvw + Yem); X and Y = two numbers. Example: calc(0.5vw + 1em); The cool thing is, you can easily control 'how responsive' the text will be. Sorry if you already have a video with this method. I haven't watched all your videos (you rock BTW), and I haven't seen this technique anywhere else. Thanks for the excellent content. I've learned so much.
@LucianoFalettiplus
@LucianoFalettiplus 4 жыл бұрын
Have you ever used calc (Xvw + Yvh) ?
@truefisherking
@truefisherking 4 жыл бұрын
@@LucianoFalettiplus I've played with it, but I wanted a method that mimicked (mx + b). I wanted a constant, but it makes sense to use Yvh. In theory, a constant is better, but in practical use, if a user is trying to view your page in a manner that makes the text too small to read, then they probably can't see anything anyways.
@albirtarsha5370
@albirtarsha5370 4 жыл бұрын
This is better as it resembles y=mx+b
@markcook8516
@markcook8516 Жыл бұрын
This is a video to remember, having seen, when I might someday come across this concern. I am so new to CSS and realizing how powerful it is. Organizing all my notes, so that I can quickly find previous points of interest is my most pressing issue. Robert Pirsig's book: comes to mind and all the notes that the narrator kept.
@yasirtahirkheli74
@yasirtahirkheli74 5 жыл бұрын
easy, simple and elegant explanations....you are probably the best instructor for css i have ever come across...Kevin...stay blessed
@KevinPowell
@KevinPowell 5 жыл бұрын
Thanks ks so much for the kind words, so glad that your enjoying my videos 😁
@ruuguuin
@ruuguuin 4 жыл бұрын
this is brilliant. you not only show us what code does but tell us how can we use simple code like this in a a different situations which is super useful !
@VideoMo2000
@VideoMo2000 2 жыл бұрын
Great video! I was using vh for my header most of the times but never tought about using vw for responsive Titles. You are the reason I dont hate CSS as much as I used to.
@mohamedelidrissi2839
@mohamedelidrissi2839 5 жыл бұрын
I heard you read all comments, even those in videos that are 2 years old, so I just wanna say hi and thanks for the well explained videos!
@reshairo
@reshairo 4 жыл бұрын
now 3 year 😉
@keshav2136
@keshav2136 4 жыл бұрын
Hi
@pedhead
@pedhead 3 жыл бұрын
@Kase Jaziel wut if you don't have a GF? #foreveralone 😭
@mukeshrap6sm27ezdaguraopp6
@mukeshrap6sm27ezdaguraopp6 3 жыл бұрын
Ttþoo88t
@subfreeman9778
@subfreeman9778 5 ай бұрын
Thanks alot, although the vmax and vmin is making me go crazy, but i love the entire concept
@saguoran
@saguoran 5 жыл бұрын
I was looking for the video "vh vs em css", KZbin gave me this one. Thanks Kevin, I have better understanding of them.
@adolfojbarreto5021
@adolfojbarreto5021 5 жыл бұрын
I can't believe I missed this video when you published it! The aggravation this would have saved me, Kevin. I have a patch of grey hair due to this issue. Thanks again!
@devincox7985
@devincox7985 4 жыл бұрын
Hey Kevin. Just wanted to say thanks for giving me a half a dozen "monkey-touch-rock" realization moments in the last few days with regards to responsive design. It's helped immensely.
@milleniummoses
@milleniummoses 7 жыл бұрын
I've a good portion of today and yesterdya watching yoru videos. I've learned so much. It's like my skillset adn efficiency exponentially improved overnight. THANKS!
@KevinPowell
@KevinPowell 7 жыл бұрын
That's great to hear David, I'm glad my videos are helping you out! Always humbling to know some people are binge watching my stuff!
@matthewcain8118
@matthewcain8118 3 жыл бұрын
I honestly thought I'd never have a use for vmin vmax, what a fun surprise! Thanks!
@pottingshedgene
@pottingshedgene 4 жыл бұрын
Yet another super clear explanation Kevin. Superb.. Thank you again. STILL enjoying your 21 day course. Try it folks it's ace.
@leticiaespino7251
@leticiaespino7251 2 жыл бұрын
Awesome content Kevin. Thanks for your hard work and for all the effort you put into this.
@SamCrowetheCreativeCrowe
@SamCrowetheCreativeCrowe 2 жыл бұрын
Nice explanation per usual. Feeling calmer about front end stuff and warming up to CSS. You may have saved my work from home job with your content. You are making a big difference, Kevin. Thank you!
@nswayze2218
@nswayze2218 2 жыл бұрын
This is such a short lesson but actually so useful!! thank you!
@PaulNieman
@PaulNieman 2 жыл бұрын
I've subscribed to the course which is brilliant and in small enough bites to be digestible. There is so much to play with regarding this particular lesson: vh vw vmin vmax. Thank you Kevin.
@ayanghazi7632
@ayanghazi7632 3 жыл бұрын
well that was one hell of a concept man, thanks for explaining it in such a nice manner.
@almonddaves
@almonddaves 6 жыл бұрын
Thank you so much! You make this tutorials really fun and I actually enjoy learning about all this! My layouts will look better than ever thanks to you!
@surajitdas94
@surajitdas94 6 жыл бұрын
Hey Kevin. Thanks for all the good stuffs. Love form India.
@elninoxz97
@elninoxz97 5 жыл бұрын
This tutorial made it crystal clear what these responsive units do, thanks man!
@newmanadesan9964
@newmanadesan9964 Жыл бұрын
I really enjoyed this video, I am learning a lot from your course. thank you for making it free. I just am a young front end developer hoping to break into the industry. This is good content.
@jcespinoza
@jcespinoza 5 жыл бұрын
Just commenting to say hi :) And thanks for the tutorial. I feel I'm finally on the right track to becoming a front-end dev with these videos!
@TazExprez
@TazExprez 2 жыл бұрын
Thanks a lot for this! Finally got vmin and vmax.
@Aeriallistique
@Aeriallistique 6 жыл бұрын
got a 7 hour layover in Madrid soon...your videos will keep me highly entertained!! thank you.
@KevinPowell
@KevinPowell 6 жыл бұрын
Oh man, that's a killer layover! Glad that I'll help you occupy some of that time :)
@paulinadoki1043
@paulinadoki1043 4 жыл бұрын
Thank you for your videos and the super cool Responsive Layouts Challange I'm conquering right now. I've started understanding and doing things rather than just being curious about web development.
@regbarnard2866
@regbarnard2866 4 жыл бұрын
Thanks Kevin another great video, I am working through them. Excellent CSS and HTML content, cheers
@JonHyatt_UT
@JonHyatt_UT 5 жыл бұрын
Super useful... especially as I'm working on understanding modern design using CSS
@matchflixCH
@matchflixCH Жыл бұрын
I liked the introduction into the units used for titles. Bringing in min(), max() and clamp() would be a useful addition to it I think.
@junaid7083
@junaid7083 Жыл бұрын
very well explained👏 use vmin for p use vw in titles for dynamically adjusting titles
@jason0ng
@jason0ng 4 жыл бұрын
Really useful tutorial, cleared up a lot for me! Thank you.
@ינוןאלבז-כ1ז
@ינוןאלבז-כ1ז 6 жыл бұрын
I learn a lot from every video of yours, I've just discovered your channel and you treasure
@jamiroquaiordie
@jamiroquaiordie 3 жыл бұрын
the best teacher out there
@mauriciovargasrincon3368
@mauriciovargasrincon3368 Жыл бұрын
An updated video on the handling of these viewport units would be wonderful. Thanks ;)
@anandcherian.585
@anandcherian.585 6 ай бұрын
very useful
@KelseyThornton
@KelseyThornton 3 жыл бұрын
vmin for headers looks pretty neat!
@thelanguagecube9009
@thelanguagecube9009 2 жыл бұрын
Thank you so much for the advice Kevin , i will use this in my next project
@utkarshkukreti239
@utkarshkukreti239 5 жыл бұрын
Thank you Kevin. It was good from both practical and theory.
@heliodias2865
@heliodias2865 3 жыл бұрын
As always fantastic video, very clarifying.
@davidoluremi1981
@davidoluremi1981 2 жыл бұрын
Hey Nice Video, you really explained the css viewport concepts. Thanks Kevin.
@VinayKumar-konvict
@VinayKumar-konvict 3 жыл бұрын
this video cleared out my doubts on vmin and vmax
@justnevergiveup6761
@justnevergiveup6761 3 жыл бұрын
Thanks Kevin, I'm learning a lot from you.
@oluwaseunogundipe1531
@oluwaseunogundipe1531 2 жыл бұрын
great video Thanks for sharing
@diegoperegrino8152
@diegoperegrino8152 2 жыл бұрын
Thanks for the explanation! Some relative units like these ones can be a little bit confusing for beginners like me.
@patd5280
@patd5280 3 жыл бұрын
Excellent as always...
@wais4148
@wais4148 5 жыл бұрын
it really helped me, tnx a lot man! I like ur explanation method (from Afghanistan)
@sueknox1104
@sueknox1104 Жыл бұрын
Great information Kevin!
@benzflynn
@benzflynn 3 жыл бұрын
Good tips here on title sizing with vw and vmin.
@victordima5259
@victordima5259 3 жыл бұрын
That's exactley what i needed! Thank you very much
@danielchibuogwu9832
@danielchibuogwu9832 3 жыл бұрын
Thank you so much for this video, God Bless you man.
@TheCocoaDaddy
@TheCocoaDaddy 3 жыл бұрын
Thanks for yet another very useful video!!!!
@kluchtube7042
@kluchtube7042 3 жыл бұрын
God bless you man!
@jefferymuter4659
@jefferymuter4659 6 жыл бұрын
This one was hyper useful. Just getting into Javascript, but wanted to get a better foundation in HTML&CSS, especially using better mediaQ, which eventually led me here so I can figure out calc(). This was super helpful, and will hopefully help improve my design game quite a bit.
@dot1160
@dot1160 3 жыл бұрын
Thanks Kevin your videos contain very good tips
@kartikxramesh
@kartikxramesh 4 жыл бұрын
God the demo web page is so satisfying!
@fedoraexpert
@fedoraexpert 3 жыл бұрын
Simply!! great stuff, Kevin. I'll watch all your videos. your explanation of things is un-matchable.
@KevinPowell
@KevinPowell 3 жыл бұрын
Thanks so much!
@vahan-sahakyan
@vahan-sahakyan 2 жыл бұрын
I always try to find ways to avoid Bootstrap and really to keep it as simple as possible, these videos help a lot *thnx*
@Crossnake
@Crossnake 2 жыл бұрын
Thank you very much for these videos.
@thomasmeiller4455
@thomasmeiller4455 5 жыл бұрын
Very good tutorials by you. Everytime I learn just a quite a little bit more. Thks.
@mohamedramibenaouf3401
@mohamedramibenaouf3401 Жыл бұрын
thank you for this very to understand explanation!
@philipdufour7233
@philipdufour7233 3 жыл бұрын
That's so sweet on font!
@rawnoob2143
@rawnoob2143 6 жыл бұрын
The CSS code height:20vmax states that the height of the selector is 20% of the larger of viewport width and viewport height
@rawnoob2143
@rawnoob2143 6 жыл бұрын
This is a note to myself
@KevinPowell
@KevinPowell 6 жыл бұрын
It doesn't do that! It takes the viewport maximum, so it'll match either the height or width, depending on which is bigger.
@СерёгаСТАЛКЕР-х7в
@СерёгаСТАЛКЕР-х7в 3 жыл бұрын
Hi Kevin, very competent and understandable! Thanks!
@christinemoore1509
@christinemoore1509 4 жыл бұрын
Your video is still helpful. Thanks.
@etorty_dev
@etorty_dev 3 жыл бұрын
Who's here in 2021? ...lol Awesome video as always, Kevin!
@darshanpandya10811
@darshanpandya10811 3 жыл бұрын
Thank You Kevin..
@calvitocalvon1711
@calvitocalvon1711 3 жыл бұрын
I think these can be more troublesome than helpful! you open yourself to a lot of unwanted results, i think em and rems and percentages should be solid
@ekejma
@ekejma 4 жыл бұрын
Enjoy your videos thanks Kevin!
@nikolaikulikov8858
@nikolaikulikov8858 4 жыл бұрын
1:06 ...and then... retribution had come 5:30 )) funny)) Anyway)) Thaks Kelvin for the clear explanation, the best what I found so far!)
@ifzo123
@ifzo123 5 жыл бұрын
Great video. Keep on posting, please!
@ozodbekjuraev9268
@ozodbekjuraev9268 4 жыл бұрын
Thank you, very useful information
@gatoespagueti
@gatoespagueti 6 жыл бұрын
Awesome channel man! Keep it up with the great material , you have a new student. Greetings from Venezuela
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks so much David!
@maulikpatel7501
@maulikpatel7501 2 жыл бұрын
thanks for giving us this content..
@naziyatarannum7196
@naziyatarannum7196 2 жыл бұрын
Thanks for sharing that Kevin😊. I follow ur channel n it’s really useful
@christianofernandes7682
@christianofernandes7682 3 жыл бұрын
Great tutorial! Thank you
@jorgeatempa
@jorgeatempa 3 жыл бұрын
I like your content, excellent work
@HAMNAD
@HAMNAD Жыл бұрын
You are a legend 🎉❤
@aaravpant1082
@aaravpant1082 3 жыл бұрын
Thank you so much, sir.
@fire23hummer
@fire23hummer 4 жыл бұрын
That's useful, thanks!
@sashaikevich
@sashaikevich 6 жыл бұрын
You may want to check out fluid typography. CSS tricks has an article on it. It's essentially using vw units, but in a calc(), letting you set max and min font sizes to avoid media queries.
@KevinPowell
@KevinPowell 6 жыл бұрын
I've used that a lot :). We have to be careful with setting fonts with viewport units though, for accessibility reasons (users can't scale the text). For titles it's fine (I would think anyway, since they're big), but I wouldn't use it for body text.
@technicallygeckley14
@technicallygeckley14 6 жыл бұрын
Another great video. One thing that would help me personally is when you're talking about how things like vmin/max, and how those measurements are calculated, is a quick diagram. Thanks!
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks for the feedback. I wanted to do something like that, but I'm not technically savvy enough when it comes to video editing to figure it out :\.
@technicallygeckley14
@technicallygeckley14 6 жыл бұрын
No sweat my friend. Again, love your content!
@maninarush2112
@maninarush2112 5 жыл бұрын
Thanks Kevin, really helped me out.
@conansredbowtie
@conansredbowtie 3 жыл бұрын
Thank you that was very helpful.
@natnaelsisay1424
@natnaelsisay1424 Жыл бұрын
crystal clear
@oxi7576
@oxi7576 2 жыл бұрын
When you're working with vh/vw/vmin/vmax in typography and you need to set a minimum font size (so it doesn't get too small), you can always add a static value to it with calc and make sure it never goes under that value, e.g.: font-size: calc(1em + 2.5vh) This should allow it to proportionally resize to the viewport height, but make sure that it is always at least 1em in situations where the viewport height becomes too small. My proposal doesn't take in account screen sizes that get too BIG though, so perhaps that would require a media query of its own. But hey, I guess that counts for mobile-first design.
@itsPenguinBoy
@itsPenguinBoy 2 жыл бұрын
that's where clamp() comes in
@ehsansotoodeh6522
@ehsansotoodeh6522 5 жыл бұрын
Very helpful video. Thank you.
@najlepszyinformatyk1661
@najlepszyinformatyk1661 3 жыл бұрын
Thanks Kevin :)
@Monsterz6917
@Monsterz6917 2 жыл бұрын
Thank You So Much Bud
@draganbogdanovic2173
@draganbogdanovic2173 8 жыл бұрын
Wow man. That's awesome.
@KevinPowell
@KevinPowell 8 жыл бұрын
Yeah, I was pretty excited about these when I learned about them. They can be really useful, and fun to play around with.
@pika7037
@pika7037 7 жыл бұрын
Please make a video on box-sizing: border box concepts and how we use it in real life....Thank you so much
@KevinPowell
@KevinPowell 7 жыл бұрын
Another good suggestion, thanks.
@DAVIDGUALDRON
@DAVIDGUALDRON 5 жыл бұрын
Great explanation. Thank you
CSS em and rem explained #CSS #responsive
16:54
Kevin Powell
Рет қаралды 394 М.
The problems with viewport units
13:23
Kevin Powell
Рет қаралды 370 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Flexbox Tutorial - Building a simple layout with Flexbox
11:07
Kevin Powell
Рет қаралды 107 М.
A CSS Unit Deep Dive - Learn CSS Units & When To Use Them
15:13
Slaying The Dragon
Рет қаралды 99 М.
5 simple tips to making responsive layouts the easy way
15:54
Kevin Powell
Рет қаралды 787 М.
Are you using the right CSS units?
6:30
Kevin Powell
Рет қаралды 469 М.
vh, vw, vmin, vmax: How to use CSS Viewport Units
9:50
Craig A. Bourne
Рет қаралды 13 М.
Responsive Typography with CSS Clamp
8:37
Tom Is Loading
Рет қаралды 61 М.
Responsive design made easy
42:40
Kevin Powell
Рет қаралды 492 М.
Learn CSS Units In 8 Minutes
8:48
Web Dev Simplified
Рет қаралды 237 М.
The BEST Way to Create Responsive Design with Tailwind CSS (2024)
16:56
Lukas | Web Development & Design
Рет қаралды 185 М.
Why you shouldn't set font-sizes using em
13:42
Kevin Powell
Рет қаралды 130 М.