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

stats-preview-card-component-main

@gomes-leonardo

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I can't change the color of the image. I had a lot of trouble using 2 images of different sizes

Community feedback

@finkenmann

Posted

you should check your breakpoints. A lot of mobile devices going down to 320px. At this point your layout is broken. Also the value for the desktop version. Make it bigger or use flexible values for your container and the child elements to be more flexible.

Marked as helpful

0

@gomes-leonardo

Posted

@finkenmann thank u Pierre. what breakpoints do you use? I don't know which breakpoints to use, should I always use a value? or can change according to the design

0

@finkenmann

Posted

@gomes-leonardo I don't use fixed breakpoints. The layout should always determine the correct breakpoint.

In this case there are already layouts for small screen and desktop. Now you have to decide yourself, up to which width your content still looks good. I had first decided for 700px, which was actually too high for me, because the mobile design became too wide and was no longer very nice, but the two-column did not fit from the content. But when I shrunk the left element, I was able to lower the breakpoint to 600px and I am happy with this solution.

Design mobile first in any case. So start with the mobile design. You don't have to go below 320px, because there are hardly any smaller devices. Then check in the browser, from which width the layout does not look good anymore and then look for a solution for the next size, or take the solution that is already designed. With mobile first you usually avoid that you have to reset code, because mobile usually gets along with little code. With wider layouts, the complexity is then increased by flex or grid, but usually builds on the code from the mobile design. I hope this helps.

A tricky point is usually the jump down to the single column mobile design. Because here from e.g. two-column content to single-column content always a very big jump takes place and images and cards look very big at the beginning. But you just have to find the right compromise.

Translated with www.DeepL.com/Translator (free version)

Marked as helpful

0

@VCarames

Posted

Hey there! 👋 Here are some suggestions to help improve your code:

  • The header element is not needed for this challenge.
  • The images serve no other purpose than to be decorative; It adds no value. The alt tag should left blank and have an aria-hidden=“true” to hides it from assistive technology.

More Info:📚

https://www.w3.org/WAI/tutorials/images/

  • The images serve no other purpose than to be decorative; It adds no value. The alt tag should left blank and have an aria-hidden=“true” to hides it from assistive technology.

More Info:📚

https://www.w3.org/WAI/tutorials/images/

  • The statistics at the bottom are a list, so it should be built using an unordered List element.

More Info:📚

MDN <ul>: The Unordered List element

If you have any questions or need further clarification, feel free to reach out to me.

Happy Coding!🎄🎁

Marked as helpful

0
Hassia Issah 50,670

@Hassiai

Posted

Give the header a background-color of soft violet. Give the img a max-width of 100% , mix-blend-mode of multiply and an opacity of 0.7.

To center .container on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.

Use rem or em as unit for the padding, margin and width values. for more on this watch this https://youtu.be/N5wpD9Ov_To

Hope am helpful HAPPY CODING

Marked as helpful

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