Design comparison
Solution retrospective
What did you find difficult while building the project ? Answer : For this challenge, I am very aware that my CSS skills are not yet proficient, leading to difficulties with syntax and usage.
Which areas of your code are you unsure of ? Answer : I am confident in my code, but in my mind, I feel like I've created too much code, so there should be some code that can be refactored and improved.
Do you have any questions about best practices ? Answer : Certainly, how to apply CSS correctly to the code so that it is easy to read and the result is a very modern CSS.
Community feedback
- @MelvinAguilarPosted 11 months ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML π·οΈ:
- Use semantic elements such as
<main>
and<footer>
to improve accessibility and organization of your page.
CSS π¨:
- it's important to follow the guidelines provided by the project's style guide. This includes using the specified font and colors to ensure consistency and maintain the intended look and feel of the design.
- You don't need to add
font-family: "Outfit", sans-serif;
to each<p>
,<h*>
separately. Instead, add it to body.
- You should use the
box-sizing: border-box
property to make thewidth
andheight
properties include the padding and border of the element. This will make it easier to calculate the size of an element. You can read more about this here π.
- Use
min-height: 100vh
instead ofheight
. Setting the height to 100vh may result in the component being cut off on smaller screens, such as a mobile phone in landscape orientation.
- Setting the max-width of the component with a percentage or a viewport unit will behave strangely on mobile devices or large screens. You should use a max-width with a fixed unit like
320px
or20rem
to make sure that the component will have a maximum width of320px
on any device, also remove themax-width
property with a vw value.
- For a responsive and resizable component, consider using the previous
max-width
for the width and addingpadding
to avoid border touching the image. Also, setwidth: 100%
for the image to fit the size of the component.
-
Setting the element to flex doesn't add much value unless you use
gap
to provide spacing. If you don't usegap
, you can keep your element without usingflexbox
..wrapper_img_content { background-color: white; border-radius: 23px; max-width: 320px; padding: 20px; /* padding: 4vw; */ /* display: flex; */ /* flex-direction: column;; */ /* align-items: center;; */ /* width: auto;; */ } .img_content { max-width: 100%; border-radius: 2vw; /*max-width: 70vw;*/ /*margin-bottom: 3vh;*/ }
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful2 - Use semantic elements such as
- @danielmrz-devPosted 11 months ago
Hello @devBayu!
Your project looks very good!
I see that you got a lot of help already, so I'll just give you a minor suggestion:
- You can add the same
border-radius
value both for the card and the image. This will make your project look even closer to the original design. The img and the card borders match in the original, and if you do that, yours will too.
I hope it helps!
Other than that, I think you did a great job!
Marked as helpful0 - You can add the same
- @aazs-eduPosted 11 months ago
Your HTML and CSS code looks well-structured and clean, and it appears that you've put effort into creating a responsive design.
- Suggestions for Improvement:
- change
.container {background-color: aqua;}
to.container {hsl(212, 45%, 89%);}
- change
.title_card {font-size: 1.2rem;}
to.title_card {font-size: 1.375rem;}
Overall, great work!
Marked as helpful0
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