A practical guide to responsive web design

Sdílet
Vložit
  • čas přidán 7. 06. 2024
  • I have a FREE COURSE on conquering responsive layouts 👉 courses.kevinpowell.co/conque...
    🔗 Links
    ✅ Width auto vs. 100%: • CSS width auto vs 100%...
    ✅ Responsive layout practice for beginners: • Responsive layout prac...
    ✅ Position absolute and responsive layouts: • Position absolute and ...
    ⌚ Timestamps
    00:00 - Introduction
    01:00 - Websites are responsive before you write any CSS
    03:10 - Avoid fixed sizes for your layouts
    08:40 - Avoid declaring things you don’t need
    11:12 - Viewport units won’t solve most of your responsive issues
    12:50 - Letting the browser do the heavy lifting
    19:10 - There are times you will need media queries
    #css
    --
    Come hang out with other dev's in my Discord Community
    💬 / discord
    Keep up to date with everything I'm up to
    ✉ www.kevinpowell.co/newsletter
    Come hang out with me live every Monday on Twitch!
    📺 / kevinpowellcss
    ---
    Help support my channel
    👨‍🎓 Get a course: www.kevinpowell.co/courses
    👕 Buy a shirt: teespring.com/stores/making-t...
    💖 Support me on Patreon: / kevinpowell
    ---
    My editor: VS Code - code.visualstudio.com/
    ---
    I'm on some other places on the internet too!
    If you'd like a behind the scenes and previews of what's coming up on my CZcams channel, make sure to follow me on Instagram and Twitter.
    Twitter: / kevinjpowell
    Codepen: codepen.io/kevinpowell/
    Github: github.com/kevin-powell
    ---
    And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Komentáře • 153

  • @myartikool
    @myartikool Před 4 měsíci +94

    I think this part of making websites is pretty easy and was quite intuitive for me. The difficulty starts when you need to preemptively think how everything would behave on different screen sizes before you even start doing CSS. This is probably gonna get easier only after lots of practice but so far I'm still straggling with it. Especially when pixel perfect is needed.

    • @benfrese3573
      @benfrese3573 Před 4 měsíci +5

      Yeah, and the graphical design aspect has become a lot more complex as well. Design *has* to work now, and a lot of my challenges in day to day work are from finding layout and interface solutions.

    • @ImperiumLibertas
      @ImperiumLibertas Před 4 měsíci +17

      One strategy to help alleviate some of the challenging parts is to develop for a mobile device first as there are more constraints for mobile views. Reverse engineering the desktop screens from the mobile views is typically easier.

    • @myartikool
      @myartikool Před 4 měsíci +4

      @@ImperiumLibertas I've noticed that even when I do desktop-first I still end up refactoring media queries as if it was mobile first. It's just where I'm from desktop-first is the default approach.

  • @artibaraku4070
    @artibaraku4070 Před 4 měsíci +26

    I wanted this video for a long time, but you made it as if you knew what we were missing. Thank you Kevin.

  • @kevbonett
    @kevbonett Před 4 měsíci +11

    Some really great (and simple) advice. Mainly around not declaring stuff until you need to, and letting the browser do what it does best!

  • @sentionmusic
    @sentionmusic Před 4 měsíci +12

    I have seen so many dev videos and never know what they are talking about because they don't know how to explain things. THIS IS THE FIRST CHANNEL I CAN UNDERSTAND AND LOVE. thank you

  • @jmun9561
    @jmun9561 Před 2 měsíci +4

    I'm very new to basic coding, I would just like to say that while I'm doing this off my own back with no one teaching me. Watching and listening to your videos really helps. It's brilliant. Thank you for your time and sharing you knowledge.

  • @skillsvsdegree6139
    @skillsvsdegree6139 Před 4 měsíci +12

    You achieved your goal.
    I am new to frontend, only 2 months old, like I'm a baby. This video made me feel like CSS is a toy, not a boogeyman.
    I need CSS for my dream project I started to develop, and thanks to you to make me feel better with CSS. Hope most of the videos are like this, simple, straight to the point.
    subscribing.

  • @GhostWithAHoodie
    @GhostWithAHoodie Před 4 měsíci +7

    I just wanted to thank u mr Powell, i started to learn web development, and your content is amazing it helped me a lot.

  • @webdevgaur
    @webdevgaur Před 4 měsíci

    I love your content Kevin! I derive so much value from your videos. Just today I watched your video on css position property and it helped me solve a problem at work which was causing a big pain. Thank you brother man!

  • @MyDpop
    @MyDpop Před 4 měsíci

    YESS! everything you do is to help us *fall in 💘 love* with CSS and be *a little bit less frustrated* by it!
    Thank you Kevin

  • @henrythomas7112
    @henrythomas7112 Před 3 měsíci

    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!

  • @jcchaconjr
    @jcchaconjr Před měsícem

    This video was so insightful! I’ve only recently started doing some web coding for the first time in about 20 years (the bulk of my career has been working on native Windows apps). As I’m currently unemployed following a layoff, I’m in an HTML/CAS/JavaScript course as part of a larger curriculum, and the responsive design was killing me this week! As it is, I was able to get a better understanding of how all the flex options work, which allowed me to “stop fighting” the browser as you suggest, eliminating about 40 lines of CSS code in the process. My pages now behave, but your sections on grid design and the side bar might allow me to streamline my code even more.
    I only recently discovered your channel Kevin - thank you for the great content!

  • @Mynamewashere
    @Mynamewashere Před 10 dny +1

    This video is solving my PTSD from trying to figure out responsive design while trying to finish my school project at the last minute. It's almost like you can see inside my head. Thank you.

  • @juwhankim6187
    @juwhankim6187 Před 2 měsíci +1

    I simply love the tone and accent of the voice. Again, I realize how much important tonal impression is, not only the content when it comes down to educational stuff.

  • @nathanm2891
    @nathanm2891 Před 2 měsíci

    I love your videos. I remember you talking about adding complexity as the screen grow a while back. It really changed my view on styling layouts.

  • @thanhninh2863
    @thanhninh2863 Před 4 měsíci

    Thank you Kevin, I learned a lot in one video and u always have so much cool stuff to learn. Big respect for what u doing for the community now 💕💕

  • @meowthemmd
    @meowthemmd Před 4 měsíci

    CSS just ends in Mr. Powell's channel we don't need anyone else teaching CSS; fascinating, THANKS.

  • @denoww9261
    @denoww9261 Před 4 měsíci +1

    Great video! I'd love to see one about the differences in how you'd approach CSS for single-page webapps - for example, often they need to fill the full viewport height exactly, which is very different to how traditional websites work. Appreciate the content!

  • @zealest
    @zealest Před 4 měsíci +2

    crazy how you came in clutch with this guide

  • @dimkayilrit2606
    @dimkayilrit2606 Před 4 měsíci

    Miss this for so Long 😎😎, this was what made me love this channel some years back

  • @marcosferreira-dk6nw
    @marcosferreira-dk6nw Před 9 dny

    I've just started your course on responsive layouts. Thanks for sharing your knowledge freely.

  • @Hamz-aa
    @Hamz-aa Před 4 měsíci

    A very thorough explanation of responsiveness. Really appreciate ❤

  • @everythingold-school.2512
    @everythingold-school.2512 Před 4 měsíci

    When he said "Don't write CSS that you do not need" my mind was like, "You're busted boy!". Thank you, Kevin. The video helped me so much.

  • @DanteMishima
    @DanteMishima Před 4 měsíci +10

    "It is us who break the responsiveness of the web"
    - Kevin Powell, Conquering Responsive Layouts

  • @suziewilliams3194
    @suziewilliams3194 Před 7 dny

    I came across your channel recently. I must admit, your videos, knowledge and teaching skills are over the top. You know your advanced css, you teach what's needed. You don't teach unnecessary styling just for creating a video sake. Keep doing what you're doing.
    Can you please create a guide or topics list for us to learn advanced CSS better please

  • @JimKernix
    @JimKernix Před 4 měsíci +2

    Your free "Conquering Responsive Layouts" course mage responsive design super easy for me. I don't even have a problem with that since taking that course a few years ago.

  • @cseymour97
    @cseymour97 Před 4 měsíci +4

    Viewport units are great. I love using them within a clamp on all my text sizes to make them fluid! Has worked well over the years!

    • @ilogbc3090
      @ilogbc3090 Před 3 měsíci

      How do you do that? At the root?

    • @cseymour97
      @cseymour97 Před 3 měsíci

      @@ilogbc3090 just when I'm defining text sizes. For example h1 could be something like
      h1{font-size: clamp(1.25rem, 2vw + 1rem, 2rem);}
      Doing that will define your min and max text sizes and then anything in between will be relative to the screen size.

  • @Nawrotlearnscoding
    @Nawrotlearnscoding Před 4 měsíci +3

    Your take on media queries is a game-changer for me. From now on, I will try to use them more sparingly to avoid overcomplicating things. Thanks a lot, Kevin!

  • @danielekpenyong5930
    @danielekpenyong5930 Před 24 dny

    Great video and awesome lesson Kevin thanks for the detail you used in the video

  • @shamilrasheed6427
    @shamilrasheed6427 Před 2 měsíci

    Your way of teaching is very nice. Really enjoyed and learnt something.

  • @zh1094
    @zh1094 Před 3 měsíci

    great video, i love this. I am not a frontend dev but seeing that some things related to responsiveness can be just done simply.

  • @yisuslalala
    @yisuslalala Před 4 měsíci

    you're the best Kevin, thank you so much!

  • @hossamayman3587
    @hossamayman3587 Před 4 měsíci

    Just the right content at the right time love it

  • @arturmoreira9716
    @arturmoreira9716 Před 2 měsíci

    Amazing video brother. Thanks!!!

  • @jensholm2586
    @jensholm2586 Před měsícem

    great video! very thankful for theese tips as a newbie to css. Lol i came here cause i built my website after my dekstop screen and set al width and heights to pixels and then when i went on my phone it all became crazy, now ill rebuild and do it right!

  • @Wadih-bc
    @Wadih-bc Před měsícem

    Very much appreciated! Thanks.

  • @danielhalasz-szabo5143
    @danielhalasz-szabo5143 Před 4 měsíci

    Thx. I bookmarked this video as an everlasting reminder.

  • @ishowspeed7191
    @ishowspeed7191 Před 4 měsíci

    Thank For this video sir i am looking this video for soo many days and this is the best video i got today

  • @andersonlontsi299
    @andersonlontsi299 Před 4 měsíci

    Wow this is so well explained it's like I'm discovering the whole stuff again😅 Thank you sir 🙏

  • @TrxsTer
    @TrxsTer Před 4 měsíci

    Damn just when I was having hard time with responsiveness, you posted a video on it, amazing 🤩 and thanks haha

  • @solo-yl8uc
    @solo-yl8uc Před 2 měsíci

    Thank you so much, it's so helpful.

  • @apradaglez
    @apradaglez Před 4 měsíci

    That’s a pity that I couldn’t understand all that you explain. I follow you and always learn something. Thanks master

  • @hiddensinger2630
    @hiddensinger2630 Před 4 měsíci

    Very helpful video Kevin

  • @_koh92_
    @_koh92_ Před 4 měsíci +4

    Hello, Kevin!
    I want to thank you for all your job (videos, tutorials, newsletters etc.)!
    The last letter you’ve showed statictic of your CZcams channel, where mentioned Poland and his love of CSS. I’m your fan from Russia and I love CSS too!
    Could you tell about Russian # in your channel statistic? 🙂
    Your content helps me:
    1. Learn English
    2. Level up my CSS skills
    3. Teach my Frontend’s collegues of new CSS features!
    Keep up the good work! 👍

    • @KevinPowell
      @KevinPowell  Před 4 měsíci +3

      Glad that you're enjoying my content! In the last year, Russia is #13 :)

  • @dev-suresh
    @dev-suresh Před 3 měsíci

    Thank you for making CSS easy for me :)

  • @tetsuorulin9009
    @tetsuorulin9009 Před 4 měsíci

    beautiful video, thanks my G

  • @samit4me
    @samit4me Před 4 měsíci

    This is so good, fantastic video, thank you so much for this 🙌
    Sorry, I feel bad for asking, what font/theme are you using in vscode? Looks super clean ✨, especially liking the syntax highlighting colors

  • @web_alchemist_
    @web_alchemist_ Před 4 měsíci

    Loving grids the more I learn about it ⚡

  • @luciferevil9o908
    @luciferevil9o908 Před 4 měsíci

    It's very helpful thank you ❤

  • @Tiger__Man
    @Tiger__Man Před 3 měsíci

    I used to follow avoid using fixed width and height and it worked perfectly

  • @edsHTML
    @edsHTML Před 4 měsíci

    Thanks! This video is very helpful😀😀

  • @Smile__007
    @Smile__007 Před 2 měsíci +1

    Thanks for this ❤

  • @ArtyomStouch
    @ArtyomStouch Před 4 měsíci

    Thanks mr.Kevin, need more repeat .

  • @ashokreddy2982
    @ashokreddy2982 Před 4 měsíci

    As a fresher when as a group we got this requirement we just scratch our heads regarding this mobile responsive these are really helpful tips thank you kevin 🙂 previously i thought maintaining our content inside grid tag will make our container mobile responsive 😂 but inner elements wont

  • @anton9410
    @anton9410 Před 4 měsíci

    Thank you for the video! I noticed in tailwind we need to understand where the break points are, but this css only approach makes things much easier. Kevin, do you ever use tailwind or 3rd parties for css?

  • @mrd.j.2303
    @mrd.j.2303 Před měsícem

    Great video! Sidenote, can you please tell me how you make your video shift to the bottom of the screen so smoothly whenever it’s in the way?

  • @salamAlshingali
    @salamAlshingali Před 2 měsíci

    Very cool and very helpful

  • @borisgomiunik7960
    @borisgomiunik7960 Před 2 měsíci

    Thank you. You're explaining it better than the ones that made it :)

  • @D7460N
    @D7460N Před 4 měsíci

    Thanks again for this timesheet video. Keep up the great work!
    What are your thoughts on leveraging custom HTML elements, vice DIVs and classes, as a way to convey intuitive syntax with (usually) less code? I have found that it enhances fellow developers' experience (DX).

  • @remox8894
    @remox8894 Před 4 měsíci

    Just thank you Kevin.

  • @chukwubuikemonwuchuruba815
    @chukwubuikemonwuchuruba815 Před 3 měsíci

    Thank you very much!

  • @TOONSSTATION
    @TOONSSTATION Před 3 měsíci

    Thanks. I'm stuck with responsiveness hope this will help

  • @oat1000
    @oat1000 Před 4 měsíci

    Could you make a video about the background when playing videos on youtube? It's a super cool tri-axis blur effect (x, y, time). It not only is a gaussian blur, but also blends into the future frames of the video.

  • @icarodlima
    @icarodlima Před měsícem

    Every time I decided to quit the video because I had “learned enough” I saw something mind-blowing and ended up watching until the end

  • @james_horan
    @james_horan Před 22 dny

    Thank you!

  • @nathanmiddleton1478
    @nathanmiddleton1478 Před 4 měsíci +1

    You always have such beautiful cleanroom examples, thank you for that. There used to be a time it was easier to go open up the source of a site and maybe learn a thing or two, but anymore it seems like everything is hidden behind javscript code.
    Recently I visited a site and everything was generated by Javascript; the CSS, the HTML, EVERYTHING! I really feel like this is a step backwards. Like you lament in this video about keeping it simple. Whatever did happen to the KISS rule?

  • @lenerignacio
    @lenerignacio Před 3 měsíci

    Hi Kevin, thank you for all the knowledge you share across the videos and explanations. Recently, I've been seeing a "new type of responsive" known as fluid web design. Do you know about it? Is it different from the responsive? Or what should be some good concepts to have in mind for a fluid web?

  • @nguyenhuynh3792
    @nguyenhuynh3792 Před 4 měsíci

    Hi kevin, thanks for making this amazing tutorial. However, what if I want to create a grid of cards that have same width and height, should I use fixed width and height?

  • @krystofsevcik8569
    @krystofsevcik8569 Před 4 měsíci

    Great video 💯

  • @tonybowen455
    @tonybowen455 Před 4 měsíci

    I just got done fighting a grid layout with media queries. Literally everything you talked about in this video I've been doing wrong for years.

  • @torynothing4719
    @torynothing4719 Před 3 měsíci

    Nice vid!

  • @seanplynch
    @seanplynch Před 4 měsíci

    Fantastic video

  • @Skeptomenos
    @Skeptomenos Před 4 měsíci

    How would you style svg background images? I have so many problems with them zooming in or not staying on that position where they should be. As well as positioning them correctly outside of any sections or inside any section by causing overflow. I actually don't know how to position them. I'm talking especially about colored svg section transitions like minimalistic waves or something. I don't know if it even would make a difference with other svgs.

  • @xreed8
    @xreed8 Před 4 měsíci

    Could you do a vid on improving performance? I built my second personal portfolio website but it for some reason loads a little slower than your normal website, making it look a little less professional than it should be

  • @TurpoChargedGaming
    @TurpoChargedGaming Před 4 měsíci

    I agree VH/VW are iffy. But with the rise of container queries, would you use CQB/CQI or still no?

  • @huncyrus
    @huncyrus Před 4 měsíci +1

    Would be interesting to see Kevin talking about responsive design with auto-sizing font size where it scale up when u watch on 50"' and 4k (readable and ain't stuck on 14 font size) and also good on phone. If anyone know any good article or video about it, would be nice to share with me.

  • @kraigochieng6395
    @kraigochieng6395 Před 2 měsíci

    thanks so much

  • @not_amanullah
    @not_amanullah Před 3 měsíci

    Thanks ❤

  • @caspgin
    @caspgin Před 4 měsíci +1

    Do you have a css and animation series that goes from scratch to smoke?

  • @HBCGAMING
    @HBCGAMING Před 3 měsíci

    I am doing all wrong stuffs as mentioned in above video fixed size layouts always which carry me overflow problem of elements
    Now i avoid those problems.

  • @Tiger__Man
    @Tiger__Man Před 3 měsíci

    hello kevin .. i have a banner i want the height to be 20rem and i want if the screen get wider the height will be taller to be fitting the width what should i i add to acheive that

  • @mahadevovnl
    @mahadevovnl Před 4 měsíci

    A completely separate question: In CSS, we can set: `color-scheme: light dark;`
    And that's fine, we can use media queries to detect a system preference: `@media (prefers-color-scheme: light) {}`
    But does CSS also allow the user to override the system preference? Right now I'm doing that with JavaScript and it feels so clunky.
    I sometimes wonder if we need a new browser API, something like `UserPreferences` to set, reset, and update certain user preferences that would override certain media queries.

  • @ratstrat1984
    @ratstrat1984 Před 3 měsíci +1

    This is me in a nutshell. I start declaring and just declare myself right into a headache. Then I dump my CSS and start all over.

  • @a.a8720
    @a.a8720 Před 7 dny

    Im confused, im making a website, so for the hero section, i need to specify, becouse i am using a n image, if i jsut put the image in it wont look right, and for the nav bar, i need to set the margin so its on the left, but then when i resize the window i cant see it, what do i do

  • @Susindar_E
    @Susindar_E Před 3 měsíci

    Thanks!

  • @toma1610
    @toma1610 Před 5 dny

    In the CSS, it read from top to bottom, right? So, if I declare something at the top, without specifying a media query, these declarations will affect to the desktop view for default, right? This confusses me because I thought all was mobile first, so what is on the top would affect to the mobile view, then at the bottom I should add the media queries to changes widths, columns, rows, etc. I use bootstrap

  • @DaBigin
    @DaBigin Před 4 měsíci

    Ever look into Penpot? I'd love to see you do a video of your thoughts about it.

  • @user-rk5kd5sg6v
    @user-rk5kd5sg6v Před 2 měsíci

    Like this approach, but on your products, when one drops to the line below (minmax 250px, 1fr lesson) and it doesn't have a partner to share the space with, it moves to the left of the screen and has space to the side. Any way to fix this and centre it?

  • @hassansyed6087
    @hassansyed6087 Před 3 měsíci

    I'm definitely struggling with the responsive aspect of website creation.
    Like everything needs it's own dedicated space and then it needs to look uniform and if one div shifts over, the text is all over the place.
    It's a mess.
    Any idea on how to use Grid and Flexbox preemptively so that we don't counter such problems when we get to the media query section?

  • @vanessastefanova
    @vanessastefanova Před 4 měsíci

    The timing of this video makes me believe in simulation theory.

  • @abdelrahmanmohamed4990
    @abdelrahmanmohamed4990 Před 4 měsíci

    How are you coding and getting the result at the Same time in responsive mode.
    I know about live server tho, but it does not work in responsive mode.

  • @D7460N
    @D7460N Před 4 měsíci

    Well said, sir.
    HTML is responsive by default. It's not CSS' fault that things are not responsive. It's our fault for writing CSS or using a lib or framework that cause things NOT to be responsive.
    Set width/height as a last resort for intrinsic design. Less is more.

  • @franciscosilva2135
    @franciscosilva2135 Před 2 měsíci

    Im strugling with font sizes and how to make it responsive since the design i chose didnt have a smaller screen size

  • @chidubemanusiem100
    @chidubemanusiem100 Před 3 měsíci

    Please, I wanted to ask if you still have a community for coders

  • @LUKA-wt4ki
    @LUKA-wt4ki Před 4 měsíci

    can you show us how to work with figma? (if you gonna use boostrap it would be better)

  • @chrisicotec7652
    @chrisicotec7652 Před 4 měsíci

    i always recommend avoiding heights unless its essential to the element, just using padding...
    anyone else open codepen or their ide and follow along with these tutorials? and seeing what you can do

  • @M1a2n3o43
    @M1a2n3o43 Před 4 měsíci

    Does someone have a good css reset? I have been using tailwind for a long time and havent been using vanilla css for a long time, so wanted to try it out again but kinda forgot how to write a good css reset since tailwind handles that by itself. Does kevin have a github repo or video about it?

  • @outpost31737
    @outpost31737 Před 4 měsíci

    Less is most certainly more and I no longer use position absolute for complex overlapping layouts, there are better alternatives out there in the CSS universe! :)

  • @user-mc1yr4xe5q
    @user-mc1yr4xe5q Před 4 měsíci

    cool video)

  • @taunado
    @taunado Před 2 měsíci

    A diamond in the rough,

  • @idk66336
    @idk66336 Před 4 měsíci

    A video on webkits would be fun cause I do not understand how to use them