Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

flex, grid, pseudo-elements, linear-gradient and media query

seifzeghicβ€’ 10

@seifzeghic

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

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

Amer Shahβ€’ 260

@fggdbdsbfd

Posted

πŸ‘‰ "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 GitHub
Discord logo

Join 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