flex, grid, pseudo-elements, linear-gradient and media query
Design comparison
Solution retrospective
- The things I found difficult while building the project is the fonts, the size mostly.
- The areas that I'm not sure of is @media query.
- I have one question about this project, what did they mean exactly by desktop:1440px and Mobile 375px. Isn't it supposed to be many different sizes? why just two?
Community feedback
- @fggdbdsbfdPosted over 1 year ago
π "Hello! Congratulations on completing your challenge! π I noticed that you were asking about media queries " π± What are @media queries?
@media queries are a CSS feature that allow you to create styles that apply only under certain conditions, such as the screen size of a device. This makes it possible to create styles that are optimized for different devices and screen sizes, such as desktops, tablets, and smartphones.
π How do @media queries work?
To use @media queries, you simply define a set of CSS rules that apply only when certain conditions are met. For example, you might define a set of styles that only apply when the screen width is less than 768 pixels. You can also combine multiple conditions to create more complex queries.
π How do you write @media queries?
To write an @media query, you start with the @media keyword, followed by one or more conditions inside parentheses. For example:
@media (max-width: 768px) { /* Styles for screens smaller than 768 pixels wide */ }
Inside the curly braces, you define the CSS styles that should apply when the conditions are met.
π Why are @media queries important?
With the increasing use of mobile devices to browse the web, it's important to ensure that your website looks good and is easy to use on all screen sizes. By using @media queries, you can create responsive designs that adapt to the user's device and screen size, improving the user experience and making your website more accessible.
I hope that helps! Let me know if you have any other questions. π€
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord