Master Media Queries And Responsive CSS Web Design Like a Chameleon!

  Рет қаралды 268,005

Slaying The Dragon

Slaying The Dragon

Жыл бұрын

🚨🚨🚨 COURSES - slayingthedragon.io 🚨🚨🚨
Join the discord - / discord
You might be wondering why there’s a Chameleon in the thumbnail of this video.
A Chameleon can change it’s color and pattern - adapting it’s appearance to match it’s environment.
The chameleon's ability to quickly and seamlessly change its appearance is a skill to be admired - and what I’m suggesting is that we ought to be more like the chameleon when creating our responsive layouts.
The mobile-first pre-defined media queries:
/* xs */
/* @media (min-width: 475px) {} */
/* sm */
/* @media (min-width: 640px) {} */
/* md */
/* @media (min-width: 768px) {} */
/* lg */
/* @media (min-width: 1024px) {} */
/* xl */
/* @media (min-width: 1280px) {} */
/* 2xl */
/* @media (min-width: 1536px) {} */
The desktop-first pre-defined media queries:
/* 2xl */
@media (max-width: 1536px) {}
/* xl */
@media (max-width: 1280px) {}
/* lg */
@media (max-width: 1024px) {}
/* md */
@media (max-width: 768px) {}
/* sm */
@media (max-width: 640px) {}
/* xs */
@media (max-width: 475px) {}
Mobile container utility class:
.container {
width: 100%;
margin-left: auto;
margin-right: auto;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
/* xs */
@media (min-width: 475px) {
.container {
max-width: 475px;
}
}
/* sm */
@media (min-width: 640px) {
.container {
max-width: 640px;
}
}
/* md */
@media (min-width: 768px) {
.container {
max-width: 768px;
}
}
/* lg */
@media (min-width: 1024px) {
.container {
max-width: 1024px;
}
}
/* xl */
@media (min-width: 1280px) {
.container {
max-width: 1280px;
}
}
/* 2xl */
@media (min-width: 1536px) {
.container {
max-width: 1536px;
}
}
Desktop container utility class:
.container {
max-width: 1536px;
margin-left: auto;
margin-right: auto;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
/* 2xl */
@media (max-width: 1536px) {
.container {
max-width: 1280px;
}
}
/* xl */
@media (max-width: 1280px) {
.container {
max-width: 1024px;
}
}
/* lg */
@media (max-width: 1024px) {
.container {
max-width: 768px;
}
}
/* md */
@media (max-width: 768px) {
.container {
max-width: 640px;
}
}
/* sm */
@media (max-width: 640px) {
.container {
max-width: 475px;
}
}
/* xs */
@media (max-width: 475px) {
.container {
width: 100%;
}
}

Пікірлер: 295
@slayingthedragon
@slayingthedragon 8 ай бұрын
🚨🚨🚨 New CSS Course - slayingthedragon.io 🚨🚨🚨
@Psyzenn
@Psyzenn 6 ай бұрын
:OOOOOOO I really love that idea. Can you tell me if you use both dekstop and mobile containers in one css file or you select based on which design you start first like mobile -> dekstop or dekstop->mobile ? P.S. Nevermind you just mentioned at the end + I remembered you mentioned only 6 media queries and if I used both that would be 12.
@EtimDavid-rn2o
@EtimDavid-rn2o 20 күн бұрын
Nice job man, thanks a lot, How did your browser show the screen size, please I need to know?
@slayingthedragon
@slayingthedragon 20 күн бұрын
@@EtimDavid-rn2o open the chrome dev tools, toggle on the device toolbar, on the top right corners there's 3 dots, click them and select show media queries
@glaze4629
@glaze4629 5 ай бұрын
Not only your solution is more elegant, but way easier to understand, I did always struggle with this concept, thank you for such an informative video!!!
@beanguap
@beanguap 9 ай бұрын
One of the absolute greatest videos I’ve seen in regards to medía queries. One of the best CSS videos I’ve seen in general
@aytuncdemir4844
@aytuncdemir4844 Жыл бұрын
you explain things very understandable. it would be really great to see some bootstrap or tailwind or some js framework videos from you.
@VyrolF
@VyrolF 2 ай бұрын
The way you explain and show things with examples is sooooooo goooood! Congratulations for your hard work on educating us, it’s highly appreciated!
@henrythomas7112
@henrythomas7112 20 күн бұрын
Thanks for the new video! I’m looking forward to seeing what other content you post! Always good to learn as much as you can!
@ufyohwo3613
@ufyohwo3613 Жыл бұрын
I'm so glad I found your channel! your videos are so engaging and to the point. Thank you so much!
@jasonjeong3737
@jasonjeong3737 Ай бұрын
just purchased your course as a refresher for CSS. excited!
@Darius-Paul
@Darius-Paul 9 ай бұрын
finally someone who knows how to explain , without using fancy language. - all others "beginner" tutorials just gave me a headache. Hats down to you.
@DannyH77
@DannyH77 9 ай бұрын
I'm glad i found this channel. keep up the great work!!
@sojimotive7166
@sojimotive7166 Жыл бұрын
Fantastic video! could you make a video too how to use using %, px, em, vh and where to use it on perspective div, parent/children?
@relja_
@relja_ Жыл бұрын
this is also confusing to me, i cant find a video that explains it well, all they do is explain what are these units and categories them but not when to use which one.
@withacc
@withacc Жыл бұрын
He talked a little about these measurement units in another video titled 'CSS Units: A Deep Dive'
@relja_
@relja_ Жыл бұрын
@@withacc yea i watched that video its good but if i remember correctly he only covered the theory part of units but not how there are used in a real project. Not only him i never found any video that covers that part.
@moriartythenavigator1945
@moriartythenavigator1945 9 күн бұрын
Wow, what a great teacher - I learned what I wanted to know in minutes...I'm going to watch the rest of the tutorial and see what else I can learn. Thanks a lot!
@Nob47
@Nob47 10 ай бұрын
i love you bro i was searching for a tutorial which is to the point and i struck gold on this one
@bucketassrabbit1993
@bucketassrabbit1993 11 ай бұрын
your videos are amazing! thank you for making such high quality content!
@HenryL1606
@HenryL1606 6 ай бұрын
I just learned how to use media queries thanks to you!!! THANK YOU!😁
@user-mf5kx4kn8l
@user-mf5kx4kn8l 9 ай бұрын
Your explanation is great in a very short time. Best on KZfaq.
@rhapsodygrab
@rhapsodygrab Жыл бұрын
You are really always slaying the dragon....keep it up, man
@imyou3627
@imyou3627 Жыл бұрын
man you are awesome please make content often.... we can learn a lot and sure... your going to make it a million subs.
@ankitpoudel3255
@ankitpoudel3255 11 ай бұрын
Damn! Incredible content. Definitely, changing the width of 90% in the project I am currently working on!
@boy_deploy
@boy_deploy 9 ай бұрын
Pure CSS and HTML. I LOVE THIS!
@itsnariah
@itsnariah 24 күн бұрын
Found you!!! I've been looking everywhere on how to arrange the elements if I have to view them in mobile and this video helps me so much! Thanks!
@caioresque
@caioresque 5 ай бұрын
Oh my god, this video that was i need to see. Thank you from Brazil, bro
@ShaDoW_T0.
@ShaDoW_T0. 10 күн бұрын
i loved your videos bro it was short and simple and most of all it was really helpful
@thebestof_angel8010
@thebestof_angel8010 8 ай бұрын
This is exactly what I was looking for, life saver thanks man
@sayanghosh6996
@sayanghosh6996 Жыл бұрын
Love your videos! keep them coming.
@UwaisLatona
@UwaisLatona 3 ай бұрын
oh my god thank you so much for this, other videos were just complicating things so much
@user-by6bi8wj3h
@user-by6bi8wj3h 10 ай бұрын
Informative, helpful and aesthetic 5/5 tutorial. Earned me as a subscriber.
@KelvinEreremena
@KelvinEreremena 27 күн бұрын
I love this man. Thank you!!!!
@zafit02
@zafit02 Жыл бұрын
You are the best keep this way you will have millions of views so easy to learn with you
@MONGMONG-ep3eb
@MONGMONG-ep3eb 17 күн бұрын
thank youuuuuuu I've been struggling with my lesson lately and now i understand it
@charlesngerem3198
@charlesngerem3198 Жыл бұрын
Keep pushing out these contents and you're heading for 1M subs
@shiba_baig1631
@shiba_baig1631 4 ай бұрын
impressed by your videos extremely smooth and deep explanation...... keep it up!
@ragenk1062
@ragenk1062 Жыл бұрын
Thanks for sharing your knowledge! Looking forward to your next video :P
@Bol_imla
@Bol_imla 6 ай бұрын
great illustration.Keep it up for the wonderful tutorial
@AbhinandanMishra1
@AbhinandanMishra1 Жыл бұрын
You're awesome 🎉 Please make more videos and teach the hard parts of CSS.
@mackenmd
@mackenmd 11 ай бұрын
Your presentation skills are second to none! Thank you very much for your very professional work.
@matthewnjoroge4759
@matthewnjoroge4759 11 ай бұрын
How do i get my browser to show me pixel dimensions?
@casperdrums
@casperdrums 8 ай бұрын
@@matthewnjoroge4759 see my comment
@ijadjukaj7539
@ijadjukaj7539 8 ай бұрын
Very nice video as usually, explaining with practical work is very effective... your videos are the most understandable front-end tutorials on youtube in my opinion... I wonder if you do some videos about javascript concepts you would help us because are a little confusing.
@Sami_K99
@Sami_K99 Жыл бұрын
Welcome back 🎉 great video
@Kronical_Lpd
@Kronical_Lpd Жыл бұрын
I've never seen this many chameleons within the first 20 seconds of a video All jokes aside tho, amazing video like always.
@yosefff19
@yosefff19 9 ай бұрын
You really make coding looks so easy and fun! definitely worth watching every videos of yours! so educational and good for beginners :)) I hope you upload more content
@TerryLoughran
@TerryLoughran 3 күн бұрын
Very cool and so adaptable for all builds. Mobile first all the way 😊 Thanks 👍
@FajarFadhillah-vt4dh
@FajarFadhillah-vt4dh 8 ай бұрын
This is good and effective, explain something with good visual, i like it
@SUPA93200
@SUPA93200 Жыл бұрын
Wow, excellent, thanks again for sharing your knowledge.
@leomacdon7858
@leomacdon7858 Жыл бұрын
Thank you. Your contents are really helpful.
@chrismachabee3128
@chrismachabee3128 Ай бұрын
I have been trying to understand the mobile design first concept for a while. How the heck do you do that? Yu have just shown me the way. Total brilliant. I go to a lot of instructors to get sorted, without success on this problem, but you were the best teaching the method. The only that took time to explain the difference between Max and MIn and how it relates t mobile first responsive desive. Well done. Now. if you just get the Javascript course done.
@charlesbrill1531
@charlesbrill1531 2 ай бұрын
thank you deeply from my soul for this video
@khumanshusingh
@khumanshusingh Жыл бұрын
amazing work bro really learned everything clearly💯💯
@iamsunil21
@iamsunil21 Жыл бұрын
your voice is like daily dose of internet.
@DojoDyo
@DojoDyo 4 ай бұрын
another awesome guide STD!! please make more !! HTML and CSS!!
@j.caceres8069
@j.caceres8069 Жыл бұрын
Que buen video amigo!!! M gustan tus videos y como los explicas.
@soum-ik
@soum-ik Жыл бұрын
Your video concept is awesome. It very helps full for m. Take love from Bangladesh💖💖, Love you brother. Create this type of video regularly
@OmniOmnium
@OmniOmnium Жыл бұрын
Great video as usual! :) I was wondering if you would be interested in creating a video about those "pop in" animations when scrolling down while the elements get visible. That'd be dope, feels like every portfolio piece has them.
@slayingthedragon
@slayingthedragon Жыл бұрын
Sure great suggestion thanks ☺️❤️
@roronoazoro3163
@roronoazoro3163 10 ай бұрын
​@@slayingthedragoncan you please tell me which website are you using to shrink those size of websites without shrinking the actual chrome page
@tuffilaro1565
@tuffilaro1565 7 ай бұрын
@@roronoazoro3163 it's a feature of the chrome dev tools. Google: "chrome devtools device mode" to find how to do it. Fyi Firefox also has that feature and it works better there in my opinion because you can also zoom in and out in it by just using ctrl + mouse wheel.
@simba---
@simba--- 6 ай бұрын
@@roronoazoro3163 Its not a website but dev tools in your browser. Right click, inspect and click on mobile icon on the top. I assume you already found an answer but in case you did not I hope this will help.
@mohammadabbas1623
@mohammadabbas1623 Жыл бұрын
you are doing great bro keep going
@sanselm529
@sanselm529 9 ай бұрын
thank you. very good explained
@michaelchukwu7480
@michaelchukwu7480 Жыл бұрын
God! The Way you explain things....... It just so mind blowing. You have a gift bro, I would seriouly want to learn or have a teacher with even half of your teaching skills. You just got yourself a faithful Subscriber. Keep it up bro!!!1
@slayingthedragon
@slayingthedragon Жыл бұрын
Thank you much love ❤️
@brandophiri3618
@brandophiri3618 6 ай бұрын
This guy is actually good
@bobevskiboban
@bobevskiboban 7 ай бұрын
Salute to you sir, helped a ton
@lastspoil5547
@lastspoil5547 4 ай бұрын
Best video on media query
@Zubair73735
@Zubair73735 7 ай бұрын
thanks a lot! It helps me a lot
@thelegaldrive
@thelegaldrive 7 ай бұрын
very useful video, thank you.
@rSethu98
@rSethu98 3 ай бұрын
Very nice approach
@Xooou_
@Xooou_ Жыл бұрын
Waiting for this!❤❤
@deepjoshi356
@deepjoshi356 Жыл бұрын
There are many solution to a single problem. You have the clarity to choose the best fit. What are the problems are you facing?
@tusharyadav5874
@tusharyadav5874 Жыл бұрын
Thanks for the video ❤
@fragmiddlet
@fragmiddlet Жыл бұрын
Thanks !! :) amazing video :)
@brianm3160
@brianm3160 Жыл бұрын
You're back!
@samueldayo9261
@samueldayo9261 5 ай бұрын
I love your teaching your good. Other mentors just type the code you can't even know how. It functions
@UndeadSasuke34
@UndeadSasuke34 Жыл бұрын
Exceptional video! Could you please make an in depth video about margins, paddings and borders, and in that video also go in depth about nitty gritty stuff like the consequence you've talked about at 8:10? There are many videos about this out there, but none go in depth about the relations and consequences of these properties.
@slayingthedragon
@slayingthedragon Жыл бұрын
Good suggestion ❤️
@M7D_aska
@M7D_aska 9 ай бұрын
Could you make a video talking about the differences between normal CSS and tailwind , as well as how much of a difference using JavaScript can make
@DJReeRee
@DJReeRee 11 ай бұрын
Love this❤
@fernandosiahaan906
@fernandosiahaan906 11 ай бұрын
You are a CSS magician
@Evolveado
@Evolveado 4 күн бұрын
just AMAZING.
@728sahilpanchbhaiya5
@728sahilpanchbhaiya5 10 ай бұрын
Earned a subscriber today...❤❤❤
@benjicanones1454
@benjicanones1454 11 ай бұрын
Superv explanation!
@shaunm9025
@shaunm9025 Жыл бұрын
you make great videos bro
@japoetrycollection5201
@japoetrycollection5201 Жыл бұрын
I subscribe your channel right now I love the way that's you teaching Please make separate playlists of all HTML5 CSS3 and JAVASCRIPT and it's frame works and it's different small projects
@snakeeyesOFFICIAL76
@snakeeyesOFFICIAL76 Жыл бұрын
Best video about media queries my friend ...you should upload more content
@slayingthedragon
@slayingthedragon Жыл бұрын
Thank you !!
@andrewii23
@andrewii23 Жыл бұрын
I love the intro 😂
@user-xj6fp8mc1o
@user-xj6fp8mc1o 10 ай бұрын
A Damn good video... this is a damn good video
@zexinzhao5423
@zexinzhao5423 Жыл бұрын
nice video, thks for sharing ! 😘
@Shivam-sl4sp
@Shivam-sl4sp 3 ай бұрын
Great explanation as always! btw do you use any extension when you apply media query your dev tools use colors to specify it?
@slayingthedragon
@slayingthedragon 3 ай бұрын
Thanks! No I'm not using any extensions, it's all features you can activate on Chrome's dev tools
@deatho0ne587
@deatho0ne587 6 ай бұрын
Display grid or flex with a bit of clamp() will cover most things you are talked about. I am not saying the media query is completely out of the picture though. You then have @container queries which are way better than @media, but not 100% supported till about September of this year. Yes, stuff like bootstrap and tailwind have to go with @media since they have to be for almost any site out there. They generally are not custom sites though.
@NewbieDev42-it8tg
@NewbieDev42-it8tg Жыл бұрын
Great video
@shauryasoni748
@shauryasoni748 Жыл бұрын
Bro please make a full css course with all animations and all please
@JosephCodette
@JosephCodette Жыл бұрын
You could use clamp for responsive sizing .. saves a lot of lines of code
@izuchukwupromise4071
@izuchukwupromise4071 6 ай бұрын
How does clamp work?
@justinmathew8929
@justinmathew8929 Жыл бұрын
Waiting for more videos ☺️☺️
@maxxphire.
@maxxphire. 3 ай бұрын
This guy is good explaining css properties. Now my prob' is how i am going to use it properly. I have to understand how css relative measurements works. Specially the pixels and viewports. They're quite confusing.
@kenxinhxc1635
@kenxinhxc1635 Жыл бұрын
Thanks for this
@hiphiphorhayy
@hiphiphorhayy Ай бұрын
I like your mobile first approach. Makes alot of sense and makes for less work aswell haha. Which video is it where you do a real world example by making a website using this approach?
@slayingthedragon
@slayingthedragon Ай бұрын
I use this in the building a portfolio website video
@marselse
@marselse 9 ай бұрын
you are him.. ty for this
@antonijo01
@antonijo01 10 ай бұрын
Can you make a video with fluid typography and spacing?
@aurorapaisley7453
@aurorapaisley7453 7 ай бұрын
YOU'RE SO BASED
@lastingfdreedom
@lastingfdreedom 11 ай бұрын
Great video1 thanks. Wondering what tools or plug-in are you using to show the window size in px at the top of the display. Thanks
@slayingthedragon
@slayingthedragon 11 ай бұрын
Nothing, just open the dev tools on chrome, toggle on the mobile view, click the 3 dots on the top right and select show media queries
@lastingfdreedom
@lastingfdreedom 11 ай бұрын
@@slayingthedragon thanks for the tip
@ThiagoSilva-jn6ov
@ThiagoSilva-jn6ov 2 ай бұрын
good thing my g
@brandonlizardo7662
@brandonlizardo7662 5 ай бұрын
thank you so much
@proplayers4513
@proplayers4513 7 ай бұрын
Thanks you fantastic video! Pleasz witch Browser do you use?
@slayingthedragon
@slayingthedragon 7 ай бұрын
Thanks, chrome
@ogawde7
@ogawde7 10 ай бұрын
blessing thats all i can say
@NagaVibzartworks
@NagaVibzartworks 5 күн бұрын
great video(s) and very clear explanations !!! how do you get the dimensions of the viewport on top of your screen?
@slayingthedragon
@slayingthedragon 5 күн бұрын
Thanks! The dimensions on top are a native feature of the chrome dev tools. Just open your dev tools, toggle on the device toolbar, click on the 3 dots on the top right corner and select "show media queries"
@mdtausifahmed6205
@mdtausifahmed6205 7 ай бұрын
coool man
@GhsT_-uf4nz
@GhsT_-uf4nz 3 ай бұрын
what extension did you use for manually adjusting the screen resolution for your website?
Learn CSS Positioning Quickly With A Real World Example
8:32
Slaying The Dragon
Рет қаралды 571 М.
КАКОЙ ВАШ ЛЮБИМЫЙ ЦВЕТ?😍 #game #shorts
00:17
Normal vs Smokers !! 😱😱😱
00:12
Tibo InShape
Рет қаралды 119 МЛН
🍟Best French Fries Homemade #cooking #shorts
00:42
BANKII
Рет қаралды 30 МЛН
Install Local Server for PHP & MySQL with OOP Bootcamp
13:46
The problem with mobile-first CSS
13:53
Kevin Powell
Рет қаралды 122 М.
Media Query in CSS [Easiest Way] | How To Write Media Queries FAST
7:33
Responsive Flexbox Layout in 2 Minutes
2:41
SolarDev
Рет қаралды 11 М.
Top 10 Advanced CSS Responsive Design Concepts You Should Know
20:16
Web Dev Simplified
Рет қаралды 496 М.
Tutorial: Learn how to use CSS Media Queries in less than 5 minutes
4:30
Learn CSS Flexbox in easy way
9:09
Nova Designs
Рет қаралды 6 М.
Responsive Website Design Explained With Practical Example - Hindi
12:50
Hindi Tech Tutorials
Рет қаралды 46 М.
Useful & Responsive Layouts, no Media Queries required
11:03
Kevin Powell
Рет қаралды 167 М.
Топ-3 суперкрутых ПК из CompShop
1:00
CompShop Shorts
Рет қаралды 321 М.
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Рет қаралды 12 МЛН
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 10 МЛН
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 1,7 МЛН