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

blog-preview-card-main-HTML-CSS

Wuffskyartsā€¢ 60

@Wuffskyarts

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

Going into this project, I felt more confident as the previous project was similar. This one ran a bit more smoothly, but I had to be super careful about my div styles. The figma file really helped!

What challenges did you encounter, and how did you overcome them?

My biggest challenge was the padding, with multiple div's and styles. The way I overcame this challenge was using the inspector tool to see which parts of my CSS are influencing each style inside each div.

What specific areas of your project would you like help with?

I'd love to know if there are any areas I could optimize my CSS. I feel some of my styles could be assigned to the body variable. I'd also like to know if there's another more optimized way of coding this card.

Community feedback

P
webdevbynightā€¢ 130

@webdevbynight

Posted

Some feedback:

  • you should better organise your code by grouping images and stylesheets (and scripts when doing JavaScript) into dedicated subdirectories, just like that:
Your project
ā”œā”€ā”€ index.html
ā”œā”€ā”€ css/
|   ā””ā”€ā”€ styles.css
ā”œā”€ā”€ images/
|   ā”œā”€ā”€ some-image.svg
|   ā””ā”€ā”€ another-image.webp
ā””ā”€ā”€ js/
    ā””ā”€ā”€ script.js

;

  • when declaring font families, you do not need quotes if the font name does not contain any spaces (for example: font-family: Figtree;) and, by the way, since Figtree is not a serif font, the generic font to declare is sans-serif;
  • you should avoid pixels to declare font sizes and instead use relative units such as rem for accessibility purposes;
  • you should try to use relative units for paddings, margins and dimensions for the design to be elastic;
  • the text-align: start declaration is useless, since start is the initial (or default) value of the text-align property, same for flex-direction: row, since row is flex-direction initial value: do not hesitate over checking the initial values of each CSS property on MDN;
  • the justify-content: start is not needed here;
  • when using ampersands (&) within a text, it is better to code it with the appropriate HTML entity (&), since & is a special character in HTML (and XML) with which any HTML (and XML) entity starts;
  • to improve the semantics of your HTML, you should learn about the article element and the time element.

Marked as helpful

1

Wuffskyartsā€¢ 60

@Wuffskyarts

Posted

@webdevbynight This is insanely helpful! Thank you so much for the feedback :)

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